mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
deps: Upgrade libarchive 3.6.2->3.7.4
This commit is contained in:
parent
c2ed524e44
commit
61171a0db6
1425 changed files with 12545 additions and 122968 deletions
|
@ -9,8 +9,8 @@ OPTION (DRIVELIST_FILTER_SYSTEM_DRIVES "Filter System drives from displayed driv
|
||||||
project(rpi-imager LANGUAGES CXX C)
|
project(rpi-imager LANGUAGES CXX C)
|
||||||
set(IMAGER_VERSION_MAJOR 1)
|
set(IMAGER_VERSION_MAJOR 1)
|
||||||
set(IMAGER_VERSION_MINOR 8)
|
set(IMAGER_VERSION_MINOR 8)
|
||||||
set(IMAGER_VERSION_STR "${IMAGER_VERSION_MAJOR}.${IMAGER_VERSION_MINOR}.5")
|
set(IMAGER_VERSION_STR "${IMAGER_VERSION_MAJOR}.${IMAGER_VERSION_MINOR}.6")
|
||||||
set(IMAGER_VERSION_CSV "${IMAGER_VERSION_MAJOR},${IMAGER_VERSION_MINOR},5,0")
|
set(IMAGER_VERSION_CSV "${IMAGER_VERSION_MAJOR},${IMAGER_VERSION_MINOR},6,0")
|
||||||
add_definitions(-DIMAGER_VERSION_STR="${IMAGER_VERSION_STR}")
|
add_definitions(-DIMAGER_VERSION_STR="${IMAGER_VERSION_STR}")
|
||||||
add_definitions(-DIMAGER_VERSION_CSV=${IMAGER_VERSION_CSV})
|
add_definitions(-DIMAGER_VERSION_CSV=${IMAGER_VERSION_CSV})
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
@ -98,14 +98,14 @@ find_package(Qt5 5.14 QUIET COMPONENTS Core Quick LinguistTools Svg OPTIONAL_COM
|
||||||
if (Qt5_FOUND)
|
if (Qt5_FOUND)
|
||||||
set(QT Qt5)
|
set(QT Qt5)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "" FORCE)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "11" CACHE STRING "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
find_package(Qt6 QUIET COMPONENTS Core Quick LinguistTools Svg OPTIONAL_COMPONENTS Widgets DBus WinExtras)
|
find_package(Qt6 QUIET COMPONENTS Core Quick LinguistTools Svg OPTIONAL_COMPONENTS Widgets DBus WinExtras)
|
||||||
if (Qt6_FOUND)
|
if (Qt6_FOUND)
|
||||||
set(QT Qt6)
|
set(QT Qt6)
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.14" CACHE STRING "" FORCE)
|
set(CMAKE_OSX_DEPLOYMENT_TARGET "11" CACHE STRING "" FORCE)
|
||||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "" FORCE)
|
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "" FORCE)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
@ -210,11 +210,11 @@ if (WIN32)
|
||||||
set(ENABLE_TAR OFF CACHE BOOL "")
|
set(ENABLE_TAR OFF CACHE BOOL "")
|
||||||
set(ENABLE_CPIO OFF CACHE BOOL "")
|
set(ENABLE_CPIO OFF CACHE BOOL "")
|
||||||
set(ENABLE_CAT OFF CACHE BOOL "")
|
set(ENABLE_CAT OFF CACHE BOOL "")
|
||||||
add_subdirectory(dependencies/libarchive-3.6.2)
|
add_subdirectory(dependencies/libarchive-3.7.4)
|
||||||
# Disable shared libarchive (we only want static)
|
# Disable shared libarchive (we only want static)
|
||||||
set_target_properties(archive PROPERTIES EXCLUDE_FROM_ALL 1)
|
set_target_properties(archive PROPERTIES EXCLUDE_FROM_ALL 1)
|
||||||
set(LibArchive_LIBRARIES archive_static)
|
set(LibArchive_LIBRARIES archive_static)
|
||||||
set(LibArchive_INCLUDE_DIR dependencies/libarchive-3.6.2/libarchive)
|
set(LibArchive_INCLUDE_DIR dependencies/libarchive-3.7.4/libarchive)
|
||||||
|
|
||||||
# Bundled fat32format
|
# Bundled fat32format
|
||||||
add_subdirectory(dependencies/fat32format)
|
add_subdirectory(dependencies/fat32format)
|
||||||
|
@ -304,11 +304,11 @@ elseif(APPLE)
|
||||||
set(ENABLE_TAR OFF CACHE BOOL "")
|
set(ENABLE_TAR OFF CACHE BOOL "")
|
||||||
set(ENABLE_CPIO OFF CACHE BOOL "")
|
set(ENABLE_CPIO OFF CACHE BOOL "")
|
||||||
set(ENABLE_CAT OFF CACHE BOOL "")
|
set(ENABLE_CAT OFF CACHE BOOL "")
|
||||||
add_subdirectory(dependencies/libarchive-3.6.2)
|
add_subdirectory(dependencies/libarchive-3.7.4)
|
||||||
# Disable shared libarchive (we only want static)
|
# Disable shared libarchive (we only want static)
|
||||||
set_target_properties(archive PROPERTIES EXCLUDE_FROM_ALL 1)
|
set_target_properties(archive PROPERTIES EXCLUDE_FROM_ALL 1)
|
||||||
set(LibArchive_LIBRARIES archive_static)
|
set(LibArchive_LIBRARIES archive_static)
|
||||||
set(LibArchive_INCLUDE_DIR dependencies/libarchive-3.6.2/libarchive)
|
set(LibArchive_INCLUDE_DIR dependencies/libarchive-3.7.4/libarchive)
|
||||||
|
|
||||||
find_library(Cocoa Cocoa)
|
find_library(Cocoa Cocoa)
|
||||||
find_library(CoreFoundation CoreFoundation)
|
find_library(CoreFoundation CoreFoundation)
|
||||||
|
@ -329,7 +329,7 @@ elseif(APPLE)
|
||||||
|
|
||||||
else()
|
else()
|
||||||
find_package(CURL 7.32.0 REQUIRED)
|
find_package(CURL 7.32.0 REQUIRED)
|
||||||
find_package(LibArchive 3.2.0 REQUIRED)
|
find_package(LibArchive 3.7.4 REQUIRED)
|
||||||
|
|
||||||
if (NOT CMAKE_CROSSCOMPILING)
|
if (NOT CMAKE_CROSSCOMPILING)
|
||||||
find_program(LSBLK "lsblk")
|
find_program(LSBLK "lsblk")
|
||||||
|
|
File diff suppressed because it is too large
Load diff
10527
src/dependencies/libarchive-3.6.2/aclocal.m4
vendored
10527
src/dependencies/libarchive-3.6.2/aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,67 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# For every FLAG1, FLAG2 it is checked whether the compiler works with the
|
|
||||||
# flag. If it does, the flag is added FLAGS-VARIABLE
|
|
||||||
#
|
|
||||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
|
||||||
# CFLAGS) is used. During the check the flag is always added to the
|
|
||||||
# current language's flags.
|
|
||||||
#
|
|
||||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
|
||||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
|
||||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
|
||||||
# force the compiler to issue an error when a bad flag is given.
|
|
||||||
#
|
|
||||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
|
||||||
#
|
|
||||||
# NOTE: This macro depends on the AX_APPEND_FLAG and
|
|
||||||
# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
|
|
||||||
# AX_APPEND_LINK_FLAGS.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 5
|
|
||||||
|
|
||||||
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
|
|
||||||
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
|
|
||||||
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
|
|
||||||
for flag in $1; do
|
|
||||||
AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
|
|
||||||
done
|
|
||||||
])dnl AX_APPEND_COMPILE_FLAGS
|
|
|
@ -1,71 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_append_flag.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
|
|
||||||
# added in between.
|
|
||||||
#
|
|
||||||
# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
|
|
||||||
# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
|
|
||||||
# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
|
|
||||||
# FLAG.
|
|
||||||
#
|
|
||||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 6
|
|
||||||
|
|
||||||
AC_DEFUN([AX_APPEND_FLAG],
|
|
||||||
[dnl
|
|
||||||
AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
|
|
||||||
AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
|
|
||||||
AS_VAR_SET_IF(FLAGS,[
|
|
||||||
AS_CASE([" AS_VAR_GET(FLAGS) "],
|
|
||||||
[*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
|
|
||||||
[
|
|
||||||
AS_VAR_APPEND(FLAGS,[" $1"])
|
|
||||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
|
||||||
])
|
|
||||||
],
|
|
||||||
[
|
|
||||||
AS_VAR_SET(FLAGS,[$1])
|
|
||||||
AC_RUN_LOG([: FLAGS="$FLAGS"])
|
|
||||||
])
|
|
||||||
AS_VAR_POPDEF([FLAGS])dnl
|
|
||||||
])dnl AX_APPEND_FLAG
|
|
|
@ -1,74 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# Check whether the given FLAG works with the current language's compiler
|
|
||||||
# or gives an error. (Warnings, however, are ignored)
|
|
||||||
#
|
|
||||||
# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
|
|
||||||
# success/failure.
|
|
||||||
#
|
|
||||||
# If EXTRA-FLAGS is defined, it is added to the current language's default
|
|
||||||
# flags (e.g. CFLAGS) when the check is done. The check is thus made with
|
|
||||||
# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
|
|
||||||
# force the compiler to issue an error when a bad flag is given.
|
|
||||||
#
|
|
||||||
# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
|
|
||||||
#
|
|
||||||
# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
|
|
||||||
# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
|
|
||||||
# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 4
|
|
||||||
|
|
||||||
AC_DEFUN([AX_CHECK_COMPILE_FLAG],
|
|
||||||
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
|
|
||||||
AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
|
|
||||||
AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
|
|
||||||
ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
|
|
||||||
_AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
|
|
||||||
AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
|
|
||||||
[AS_VAR_SET(CACHEVAR,[yes])],
|
|
||||||
[AS_VAR_SET(CACHEVAR,[no])])
|
|
||||||
_AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
|
|
||||||
AS_VAR_IF(CACHEVAR,yes,
|
|
||||||
[m4_default([$2], :)],
|
|
||||||
[m4_default([$3], :)])
|
|
||||||
AS_VAR_POPDEF([CACHEVAR])dnl
|
|
||||||
])dnl AX_CHECK_COMPILE_FLAGS
|
|
|
@ -1,37 +0,0 @@
|
||||||
# ===========================================================================
|
|
||||||
# http://www.gnu.org/software/autoconf-archive/ax_require_defined.html
|
|
||||||
# ===========================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_REQUIRE_DEFINED(MACRO)
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
|
|
||||||
# been defined and thus are available for use. This avoids random issues
|
|
||||||
# where a macro isn't expanded. Instead the configure script emits a
|
|
||||||
# non-fatal:
|
|
||||||
#
|
|
||||||
# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
|
|
||||||
#
|
|
||||||
# It's like AC_REQUIRE except it doesn't expand the required macro.
|
|
||||||
#
|
|
||||||
# Here's an example:
|
|
||||||
#
|
|
||||||
# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
|
|
||||||
#
|
|
||||||
# Copying and distribution of this file, with or without modification, are
|
|
||||||
# permitted in any medium without royalty provided the copyright notice
|
|
||||||
# and this notice are preserved. This file is offered as-is, without any
|
|
||||||
# warranty.
|
|
||||||
|
|
||||||
#serial 1
|
|
||||||
|
|
||||||
AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
|
|
||||||
m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
|
|
||||||
])dnl AX_REQUIRE_DEFINED
|
|
|
@ -1,51 +0,0 @@
|
||||||
# AC_LANG_STDCALL_FUNC_LINK_TRY(FUNCTION, SIGNATURE)
|
|
||||||
# -------------------------------
|
|
||||||
# Produce a source which links correctly iff the FUNCTION exists.
|
|
||||||
AC_DEFUN([AC_LANG_STDCALL_FUNC_LINK_TRY],
|
|
||||||
[_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])
|
|
||||||
|
|
||||||
# AC_CHECK_STDCALL_FUNC(FUNCTION, SIGNATURE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
||||||
# -----------------------------------------------------------------
|
|
||||||
AC_DEFUN([AC_CHECK_STDCALL_FUNC],
|
|
||||||
[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl
|
|
||||||
AC_CACHE_CHECK([for $1], ac_var,
|
|
||||||
[AC_LINK_IFELSE([AC_LANG_STDCALL_FUNC_LINK_TRY([$1],[$2])],
|
|
||||||
[AS_VAR_SET(ac_var, yes)],
|
|
||||||
[AS_VAR_SET(ac_var, no)])])
|
|
||||||
AS_IF([test AS_VAR_GET(ac_var) = yes], [$3], [$4])dnl
|
|
||||||
AS_VAR_POPDEF([ac_var])dnl
|
|
||||||
])# AC_CHECK_FUNC
|
|
||||||
|
|
||||||
# AC_LANG_STDCALL_FUNC_LINK_TRY(C)(FUNCTION, SIGNATURE)
|
|
||||||
# ----------------------------------
|
|
||||||
# Don't include <ctype.h> because on OSF/1 3.0 it includes
|
|
||||||
# <sys/types.h> which includes <sys/select.h> which contains a
|
|
||||||
# prototype for select. Similarly for bzero.
|
|
||||||
m4_define([AC_LANG_STDCALL_FUNC_LINK_TRY(C)],
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[/* System header to define __stub macros and hopefully few prototypes,
|
|
||||||
which can conflict with char __stdcall $1 ( $2 ) below. */
|
|
||||||
#include <assert.h>
|
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
/* We use char because int might match the return type of a gcc2
|
|
||||||
builtin and then its argument prototype would still apply. */
|
|
||||||
char __stdcall $1 ( $2 );
|
|
||||||
char (*f) ( $2 );
|
|
||||||
],
|
|
||||||
[/* The GNU C library defines this for functions which it implements
|
|
||||||
to always fail with ENOSYS. Some functions are actually named
|
|
||||||
something starting with __ and the normal name is an alias. */
|
|
||||||
#if defined (__stub_$1) || defined (__stub___$1)
|
|
||||||
choke me
|
|
||||||
#else
|
|
||||||
f = $1;
|
|
||||||
#endif
|
|
||||||
])])
|
|
||||||
|
|
||||||
# AC_LANG_STDCALL_FUNC_LINK_TRY(C++)(FUNCTION)
|
|
||||||
# ------------------------------------
|
|
||||||
m4_copy([AC_LANG_STDCALL_FUNC_LINK_TRY(C)], [AC_LANG_STDCALL_FUNC_LINK_TRY(C++)])
|
|
||||||
|
|
|
@ -1,348 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# Wrapper for compilers which do not understand '-c -o'.
|
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# This file is maintained in Automake, please report
|
|
||||||
# bugs to <bug-automake@gnu.org> or send patches to
|
|
||||||
# <automake-patches@gnu.org>.
|
|
||||||
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
|
|
||||||
# We need space, tab and new line, in precisely that order. Quoting is
|
|
||||||
# there to prevent tools from complaining about whitespace usage.
|
|
||||||
IFS=" "" $nl"
|
|
||||||
|
|
||||||
file_conv=
|
|
||||||
|
|
||||||
# func_file_conv build_file lazy
|
|
||||||
# Convert a $build file to $host form and store it in $file
|
|
||||||
# Currently only supports Windows hosts. If the determined conversion
|
|
||||||
# type is listed in (the comma separated) LAZY, no conversion will
|
|
||||||
# take place.
|
|
||||||
func_file_conv ()
|
|
||||||
{
|
|
||||||
file=$1
|
|
||||||
case $file in
|
|
||||||
/ | /[!/]*) # absolute file, and not a UNC file
|
|
||||||
if test -z "$file_conv"; then
|
|
||||||
# lazily determine how to convert abs files
|
|
||||||
case `uname -s` in
|
|
||||||
MINGW*)
|
|
||||||
file_conv=mingw
|
|
||||||
;;
|
|
||||||
CYGWIN* | MSYS*)
|
|
||||||
file_conv=cygwin
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
file_conv=wine
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
case $file_conv/,$2, in
|
|
||||||
*,$file_conv,*)
|
|
||||||
;;
|
|
||||||
mingw/*)
|
|
||||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
|
||||||
;;
|
|
||||||
cygwin/* | msys/*)
|
|
||||||
file=`cygpath -m "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
wine/*)
|
|
||||||
file=`winepath -w "$file" || echo "$file"`
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_dashL linkdir
|
|
||||||
# Make cl look for libraries in LINKDIR
|
|
||||||
func_cl_dashL ()
|
|
||||||
{
|
|
||||||
func_file_conv "$1"
|
|
||||||
if test -z "$lib_path"; then
|
|
||||||
lib_path=$file
|
|
||||||
else
|
|
||||||
lib_path="$lib_path;$file"
|
|
||||||
fi
|
|
||||||
linker_opts="$linker_opts -LIBPATH:$file"
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_dashl library
|
|
||||||
# Do a library search-path lookup for cl
|
|
||||||
func_cl_dashl ()
|
|
||||||
{
|
|
||||||
lib=$1
|
|
||||||
found=no
|
|
||||||
save_IFS=$IFS
|
|
||||||
IFS=';'
|
|
||||||
for dir in $lib_path $LIB
|
|
||||||
do
|
|
||||||
IFS=$save_IFS
|
|
||||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/$lib.dll.lib
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f "$dir/$lib.lib"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/$lib.lib
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if test -f "$dir/lib$lib.a"; then
|
|
||||||
found=yes
|
|
||||||
lib=$dir/lib$lib.a
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS=$save_IFS
|
|
||||||
|
|
||||||
if test "$found" != yes; then
|
|
||||||
lib=$lib.lib
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# func_cl_wrapper cl arg...
|
|
||||||
# Adjust compile command to suit cl
|
|
||||||
func_cl_wrapper ()
|
|
||||||
{
|
|
||||||
# Assume a capable shell
|
|
||||||
lib_path=
|
|
||||||
shared=:
|
|
||||||
linker_opts=
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$eat"; then
|
|
||||||
eat=
|
|
||||||
else
|
|
||||||
case $1 in
|
|
||||||
-o)
|
|
||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
||||||
eat=1
|
|
||||||
case $2 in
|
|
||||||
*.o | *.[oO][bB][jJ])
|
|
||||||
func_file_conv "$2"
|
|
||||||
set x "$@" -Fo"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
func_file_conv "$2"
|
|
||||||
set x "$@" -Fe"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
-I)
|
|
||||||
eat=1
|
|
||||||
func_file_conv "$2" mingw
|
|
||||||
set x "$@" -I"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-I*)
|
|
||||||
func_file_conv "${1#-I}" mingw
|
|
||||||
set x "$@" -I"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l)
|
|
||||||
eat=1
|
|
||||||
func_cl_dashl "$2"
|
|
||||||
set x "$@" "$lib"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-l*)
|
|
||||||
func_cl_dashl "${1#-l}"
|
|
||||||
set x "$@" "$lib"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-L)
|
|
||||||
eat=1
|
|
||||||
func_cl_dashL "$2"
|
|
||||||
;;
|
|
||||||
-L*)
|
|
||||||
func_cl_dashL "${1#-L}"
|
|
||||||
;;
|
|
||||||
-static)
|
|
||||||
shared=false
|
|
||||||
;;
|
|
||||||
-Wl,*)
|
|
||||||
arg=${1#-Wl,}
|
|
||||||
save_ifs="$IFS"; IFS=','
|
|
||||||
for flag in $arg; do
|
|
||||||
IFS="$save_ifs"
|
|
||||||
linker_opts="$linker_opts $flag"
|
|
||||||
done
|
|
||||||
IFS="$save_ifs"
|
|
||||||
;;
|
|
||||||
-Xlinker)
|
|
||||||
eat=1
|
|
||||||
linker_opts="$linker_opts $2"
|
|
||||||
;;
|
|
||||||
-*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
|
||||||
func_file_conv "$1"
|
|
||||||
set x "$@" -Tp"$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
|
||||||
func_file_conv "$1" mingw
|
|
||||||
set x "$@" "$file"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
if test -n "$linker_opts"; then
|
|
||||||
linker_opts="-link$linker_opts"
|
|
||||||
fi
|
|
||||||
exec "$@" $linker_opts
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
eat=
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<\EOF
|
|
||||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
|
||||||
|
|
||||||
Wrapper for compilers which do not understand '-c -o'.
|
|
||||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
|
||||||
arguments, and rename the output as expected.
|
|
||||||
|
|
||||||
If you are trying to build a whole package this is not the
|
|
||||||
right script to run: please start by reading the file 'INSTALL'.
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "compile $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
|
|
||||||
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
|
|
||||||
func_cl_wrapper "$@" # Doesn't return...
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ofile=
|
|
||||||
cfile=
|
|
||||||
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$eat"; then
|
|
||||||
eat=
|
|
||||||
else
|
|
||||||
case $1 in
|
|
||||||
-o)
|
|
||||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
|
||||||
# So we strip '-o arg' only if arg is an object.
|
|
||||||
eat=1
|
|
||||||
case $2 in
|
|
||||||
*.o | *.obj)
|
|
||||||
ofile=$2
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" -o "$2"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
*.c)
|
|
||||||
cfile=$1
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set x "$@" "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -z "$ofile" || test -z "$cfile"; then
|
|
||||||
# If no '-o' option was seen then we might have been invoked from a
|
|
||||||
# pattern rule where we don't need one. That is ok -- this is a
|
|
||||||
# normal compilation that the losing compiler can handle. If no
|
|
||||||
# '.c' file was seen then we are probably linking. That is also
|
|
||||||
# ok.
|
|
||||||
exec "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Name of file we expect compiler to create.
|
|
||||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
|
||||||
|
|
||||||
# Create the lock directory.
|
|
||||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
|
||||||
# that we are using for the .o file. Also, base the name on the expected
|
|
||||||
# object file name, since that is what matters with a parallel build.
|
|
||||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
|
||||||
while true; do
|
|
||||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
# FIXME: race condition here if user kills between mkdir and trap.
|
|
||||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
|
||||||
|
|
||||||
# Run the compile.
|
|
||||||
"$@"
|
|
||||||
ret=$?
|
|
||||||
|
|
||||||
if test -f "$cofile"; then
|
|
||||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
|
||||||
elif test -f "${cofile}bj"; then
|
|
||||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rmdir "$lockdir"
|
|
||||||
exit $ret
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC0"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,696 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
#
|
|
||||||
# NOTE: This file was brought from
|
|
||||||
# http://git.savannah.gnu.org/cgit/gnulib.git/plain/build-aux/config.rpath
|
|
||||||
# You should sometimes check if the file is updated and bring it to
|
|
||||||
# our trunk and copy this note to the top of that file.
|
|
||||||
#
|
|
||||||
# Output a system dependent set of variables, describing how to set the
|
|
||||||
# run time search path of shared libraries in an executable.
|
|
||||||
#
|
|
||||||
# Copyright 1996-2011 Free Software Foundation, Inc.
|
|
||||||
# Taken from GNU libtool, 2001
|
|
||||||
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
|
|
||||||
#
|
|
||||||
# This file is free software; the Free Software Foundation gives
|
|
||||||
# unlimited permission to copy and/or distribute it, with or without
|
|
||||||
# modifications, as long as this notice is preserved.
|
|
||||||
#
|
|
||||||
# The first argument passed to this file is the canonical host specification,
|
|
||||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
|
||||||
# or
|
|
||||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
|
||||||
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
|
|
||||||
# should be set by the caller.
|
|
||||||
#
|
|
||||||
# The set of defined variables is at the end of this script.
|
|
||||||
|
|
||||||
# Known limitations:
|
|
||||||
# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
|
|
||||||
# than 256 bytes, otherwise the compiler driver will dump core. The only
|
|
||||||
# known workaround is to choose shorter directory names for the build
|
|
||||||
# directory and/or the installation directory.
|
|
||||||
|
|
||||||
# All known linkers require a `.a' archive for static linking (except MSVC,
|
|
||||||
# which needs '.lib').
|
|
||||||
libext=a
|
|
||||||
shrext=.so
|
|
||||||
|
|
||||||
host="$1"
|
|
||||||
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
|
||||||
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
|
||||||
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|
||||||
|
|
||||||
# Code taken from libtool.m4's _LT_CC_BASENAME.
|
|
||||||
|
|
||||||
for cc_temp in $CC""; do
|
|
||||||
case $cc_temp in
|
|
||||||
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
|
|
||||||
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
|
|
||||||
\-*) ;;
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
|
|
||||||
|
|
||||||
# Code taken from libtool.m4's _LT_COMPILER_PIC.
|
|
||||||
|
|
||||||
wl=
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
wl='-Wl,'
|
|
||||||
else
|
|
||||||
case "$host_os" in
|
|
||||||
aix*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
|
|
||||||
;;
|
|
||||||
hpux9* | hpux10* | hpux11*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
irix5* | irix6* | nonstopux*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
|
||||||
case $cc_basename in
|
|
||||||
ecc*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
icc* | ifort*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
lf95*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
nagfor*)
|
|
||||||
wl='-Wl,-Wl,,'
|
|
||||||
;;
|
|
||||||
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
ccc*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
xl* | bgxl* | bgf* | mpixl*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
como)
|
|
||||||
wl='-lopt='
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
case `$CC -V 2>&1 | sed 5q` in
|
|
||||||
*Sun\ F* | *Sun*Fortran*)
|
|
||||||
wl=
|
|
||||||
;;
|
|
||||||
*Sun\ C*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
newsos6)
|
|
||||||
;;
|
|
||||||
*nto* | *qnx*)
|
|
||||||
;;
|
|
||||||
osf3* | osf4* | osf5*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
rdos*)
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
case $cc_basename in
|
|
||||||
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
|
|
||||||
wl='-Qoption ld '
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
wl='-Qoption ld '
|
|
||||||
;;
|
|
||||||
sysv4 | sysv4.2uw2* | sysv4.3*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
sysv4*MP*)
|
|
||||||
;;
|
|
||||||
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
unicos*)
|
|
||||||
wl='-Wl,'
|
|
||||||
;;
|
|
||||||
uts4*)
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
|
|
||||||
|
|
||||||
hardcode_libdir_flag_spec=
|
|
||||||
hardcode_libdir_separator=
|
|
||||||
hardcode_direct=no
|
|
||||||
hardcode_minus_L=no
|
|
||||||
|
|
||||||
case "$host_os" in
|
|
||||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
|
||||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
|
||||||
# When not using gcc, we currently assume that we are using
|
|
||||||
# Microsoft Visual C++.
|
|
||||||
if test "$GCC" != yes; then
|
|
||||||
with_gnu_ld=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
interix*)
|
|
||||||
# we just hope/assume this is gcc and not c89 (= MSVC++)
|
|
||||||
with_gnu_ld=yes
|
|
||||||
;;
|
|
||||||
openbsd*)
|
|
||||||
with_gnu_ld=no
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
ld_shlibs=yes
|
|
||||||
if test "$with_gnu_ld" = yes; then
|
|
||||||
# Set some defaults for GNU ld with shared library support. These
|
|
||||||
# are reset later if shared libraries are not supported. Putting them
|
|
||||||
# here allows them to be overridden if necessary.
|
|
||||||
# Unlike libtool, we use -rpath here, not --rpath, since the documented
|
|
||||||
# option of GNU ld is called -rpath, not --rpath.
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
case "$host_os" in
|
|
||||||
aix[3-9]*)
|
|
||||||
# On AIX/PPC, the GNU linker is very broken
|
|
||||||
if test "$host_cpu" != ia64; then
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
amigaos*)
|
|
||||||
case "$host_cpu" in
|
|
||||||
powerpc)
|
|
||||||
;;
|
|
||||||
m68k)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
beos*)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
|
||||||
# no search path for DLLs.
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
haiku*)
|
|
||||||
;;
|
|
||||||
interix[3-9]*)
|
|
||||||
hardcode_direct=no
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
|
||||||
;;
|
|
||||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
netbsd*)
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
|
|
||||||
ld_shlibs=no
|
|
||||||
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
|
|
||||||
case `$LD -v 2>&1` in
|
|
||||||
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
|
|
||||||
ld_shlibs=no
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if test "$ld_shlibs" = no; then
|
|
||||||
hardcode_libdir_flag_spec=
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
case "$host_os" in
|
|
||||||
aix3*)
|
|
||||||
# Note: this linker hardcodes the directories in LIBPATH if there
|
|
||||||
# are no directories specified by -L.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
# Neither direct hardcoding nor static linking is supported with a
|
|
||||||
# broken collect2.
|
|
||||||
hardcode_direct=unsupported
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
aix[4-9]*)
|
|
||||||
if test "$host_cpu" = ia64; then
|
|
||||||
# On IA64, the linker does run time linking by default, so we don't
|
|
||||||
# have to do anything special.
|
|
||||||
aix_use_runtimelinking=no
|
|
||||||
else
|
|
||||||
aix_use_runtimelinking=no
|
|
||||||
# Test if we are trying to use run time linking or normal
|
|
||||||
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
|
|
||||||
# need to do runtime linking.
|
|
||||||
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
|
|
||||||
for ld_flag in $LDFLAGS; do
|
|
||||||
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
|
|
||||||
aix_use_runtimelinking=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_libdir_separator=':'
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
case $host_os in aix4.[012]|aix4.[012].*)
|
|
||||||
collect2name=`${CC} -print-prog-name=collect2`
|
|
||||||
if test -f "$collect2name" && \
|
|
||||||
strings "$collect2name" | grep resolve_lib_name >/dev/null
|
|
||||||
then
|
|
||||||
# We have reworked collect2
|
|
||||||
:
|
|
||||||
else
|
|
||||||
# We have old collect2
|
|
||||||
hardcode_direct=unsupported
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_libdir_separator=
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
# Begin _LT_AC_SYS_LIBPATH_AIX.
|
|
||||||
echo 'int main () { return 0; }' > conftest.c
|
|
||||||
${CC} ${LDFLAGS} conftest.c -o conftest
|
|
||||||
aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
|
||||||
}'`
|
|
||||||
if test -z "$aix_libpath"; then
|
|
||||||
aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
|
|
||||||
}'`
|
|
||||||
fi
|
|
||||||
if test -z "$aix_libpath"; then
|
|
||||||
aix_libpath="/usr/lib:/lib"
|
|
||||||
fi
|
|
||||||
rm -f conftest.c conftest
|
|
||||||
# End _LT_AC_SYS_LIBPATH_AIX.
|
|
||||||
if test "$aix_use_runtimelinking" = yes; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
|
||||||
else
|
|
||||||
if test "$host_cpu" = ia64; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
|
|
||||||
else
|
|
||||||
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
amigaos*)
|
|
||||||
case "$host_cpu" in
|
|
||||||
powerpc)
|
|
||||||
;;
|
|
||||||
m68k)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
bsdi[45]*)
|
|
||||||
;;
|
|
||||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
|
||||||
# When not using gcc, we currently assume that we are using
|
|
||||||
# Microsoft Visual C++.
|
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
|
||||||
# no search path for DLLs.
|
|
||||||
hardcode_libdir_flag_spec=' '
|
|
||||||
libext=lib
|
|
||||||
;;
|
|
||||||
darwin* | rhapsody*)
|
|
||||||
hardcode_direct=no
|
|
||||||
if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
dgux*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
;;
|
|
||||||
freebsd2.2*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
freebsd2*)
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
freebsd* | dragonfly*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
hpux9*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
hardcode_direct=yes
|
|
||||||
# hardcode_minus_L: Not really in the search PATH,
|
|
||||||
# but as the default location of the library.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
hpux10*)
|
|
||||||
if test "$with_gnu_ld" = no; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
hardcode_direct=yes
|
|
||||||
# hardcode_minus_L: Not really in the search PATH,
|
|
||||||
# but as the default location of the library.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
hpux11*)
|
|
||||||
if test "$with_gnu_ld" = no; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
case $host_cpu in
|
|
||||||
hppa*64*|ia64*)
|
|
||||||
hardcode_direct=no
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
hardcode_direct=yes
|
|
||||||
# hardcode_minus_L: Not really in the search PATH,
|
|
||||||
# but as the default location of the library.
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
irix5* | irix6* | nonstopux*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
netbsd*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
;;
|
|
||||||
newsos6)
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
*nto* | *qnx*)
|
|
||||||
;;
|
|
||||||
openbsd*)
|
|
||||||
if test -f /usr/libexec/ld.so; then
|
|
||||||
hardcode_direct=yes
|
|
||||||
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
|
||||||
else
|
|
||||||
case "$host_os" in
|
|
||||||
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
ld_shlibs=no
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
os2*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
osf3*)
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
osf4* | osf5*)
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
|
|
||||||
else
|
|
||||||
# Both cc and cxx compiler support -rpath directly
|
|
||||||
hardcode_libdir_flag_spec='-rpath $libdir'
|
|
||||||
fi
|
|
||||||
hardcode_libdir_separator=:
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
hardcode_libdir_flag_spec='-R$libdir'
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
hardcode_direct=yes
|
|
||||||
hardcode_minus_L=yes
|
|
||||||
;;
|
|
||||||
sysv4)
|
|
||||||
case $host_vendor in
|
|
||||||
sni)
|
|
||||||
hardcode_direct=yes # is this really true???
|
|
||||||
;;
|
|
||||||
siemens)
|
|
||||||
hardcode_direct=no
|
|
||||||
;;
|
|
||||||
motorola)
|
|
||||||
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
sysv4.3*)
|
|
||||||
;;
|
|
||||||
sysv4*MP*)
|
|
||||||
if test -d /usr/nec; then
|
|
||||||
ld_shlibs=yes
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
|
|
||||||
;;
|
|
||||||
sysv5* | sco3.2v5* | sco5v6*)
|
|
||||||
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
|
|
||||||
hardcode_libdir_separator=':'
|
|
||||||
;;
|
|
||||||
uts4*)
|
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
ld_shlibs=no
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check dynamic linker characteristics
|
|
||||||
# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
|
|
||||||
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
|
|
||||||
# only about the one the linker finds when passed -lNAME. This is the last
|
|
||||||
# element of library_names_spec in libtool.m4, or possibly two of them if the
|
|
||||||
# linker has special search rules.
|
|
||||||
library_names_spec= # the last element of library_names_spec in libtool.m4
|
|
||||||
libname_spec='lib$name'
|
|
||||||
case "$host_os" in
|
|
||||||
aix3*)
|
|
||||||
library_names_spec='$libname.a'
|
|
||||||
;;
|
|
||||||
aix[4-9]*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
amigaos*)
|
|
||||||
case "$host_cpu" in
|
|
||||||
powerpc*)
|
|
||||||
library_names_spec='$libname$shrext' ;;
|
|
||||||
m68k)
|
|
||||||
library_names_spec='$libname.a' ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
beos*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
bsdi[45]*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
cygwin* | msys* | mingw* | pw32* | cegcc*)
|
|
||||||
shrext=.dll
|
|
||||||
library_names_spec='$libname.dll.a $libname.lib'
|
|
||||||
;;
|
|
||||||
darwin* | rhapsody*)
|
|
||||||
shrext=.dylib
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
dgux*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
freebsd* | dragonfly*)
|
|
||||||
case "$host_os" in
|
|
||||||
freebsd[123]*)
|
|
||||||
library_names_spec='$libname$shrext$versuffix' ;;
|
|
||||||
*)
|
|
||||||
library_names_spec='$libname$shrext' ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
gnu*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
haiku*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
hpux9* | hpux10* | hpux11*)
|
|
||||||
case $host_cpu in
|
|
||||||
ia64*)
|
|
||||||
shrext=.so
|
|
||||||
;;
|
|
||||||
hppa*64*)
|
|
||||||
shrext=.sl
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
shrext=.sl
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
interix[3-9]*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
irix5* | irix6* | nonstopux*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
case "$host_os" in
|
|
||||||
irix5* | nonstopux*)
|
|
||||||
libsuff= shlibsuff=
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
case $LD in
|
|
||||||
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
|
|
||||||
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
|
|
||||||
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
|
|
||||||
*) libsuff= shlibsuff= ;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
;;
|
|
||||||
linux*oldld* | linux*aout* | linux*coff*)
|
|
||||||
;;
|
|
||||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
knetbsd*-gnu)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
netbsd*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
newsos6)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
*nto* | *qnx*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
openbsd*)
|
|
||||||
library_names_spec='$libname$shrext$versuffix'
|
|
||||||
;;
|
|
||||||
os2*)
|
|
||||||
libname_spec='$name'
|
|
||||||
shrext=.dll
|
|
||||||
library_names_spec='$libname.a'
|
|
||||||
;;
|
|
||||||
osf3* | osf4* | osf5*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
rdos*)
|
|
||||||
;;
|
|
||||||
solaris*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
sunos4*)
|
|
||||||
library_names_spec='$libname$shrext$versuffix'
|
|
||||||
;;
|
|
||||||
sysv4 | sysv4.3*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
sysv4*MP*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
tpf*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
uts4*)
|
|
||||||
library_names_spec='$libname$shrext'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
|
|
||||||
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
|
|
||||||
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
|
|
||||||
|
|
||||||
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
|
|
||||||
|
|
||||||
# How to pass a linker flag through the compiler.
|
|
||||||
wl="$escaped_wl"
|
|
||||||
|
|
||||||
# Static library suffix (normally "a").
|
|
||||||
libext="$libext"
|
|
||||||
|
|
||||||
# Shared library suffix (normally "so").
|
|
||||||
shlibext="$shlibext"
|
|
||||||
|
|
||||||
# Format of library name prefix.
|
|
||||||
libname_spec="$escaped_libname_spec"
|
|
||||||
|
|
||||||
# Library names that the linker finds when passed -lNAME.
|
|
||||||
library_names_spec="$escaped_library_names_spec"
|
|
||||||
|
|
||||||
# Flag to hardcode \$libdir into a binary during linking.
|
|
||||||
# This must work even if \$libdir does not exist.
|
|
||||||
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
|
|
||||||
|
|
||||||
# Whether we need a single -rpath flag with a separated argument.
|
|
||||||
hardcode_libdir_separator="$hardcode_libdir_separator"
|
|
||||||
|
|
||||||
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
|
|
||||||
# resulting binary.
|
|
||||||
hardcode_direct="$hardcode_direct"
|
|
||||||
|
|
||||||
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
|
|
||||||
# resulting binary.
|
|
||||||
hardcode_minus_L="$hardcode_minus_L"
|
|
||||||
|
|
||||||
EOF
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,791 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1999-2021 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
'')
|
|
||||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
|
||||||
exit 1;
|
|
||||||
;;
|
|
||||||
-h | --h*)
|
|
||||||
cat <<\EOF
|
|
||||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
|
||||||
|
|
||||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
|
||||||
as side-effects.
|
|
||||||
|
|
||||||
Environment variables:
|
|
||||||
depmode Dependency tracking mode.
|
|
||||||
source Source file read by 'PROGRAMS ARGS'.
|
|
||||||
object Object file output by 'PROGRAMS ARGS'.
|
|
||||||
DEPDIR directory where to store dependencies.
|
|
||||||
depfile Dependency file to output.
|
|
||||||
tmpdepfile Temporary file to use when outputting dependencies.
|
|
||||||
libtool Whether libtool is used (yes/no).
|
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
|
||||||
EOF
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
-v | --v*)
|
|
||||||
echo "depcomp $scriptversion"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Get the directory component of the given path, and save it in the
|
|
||||||
# global variables '$dir'. Note that this directory component will
|
|
||||||
# be either empty or ending with a '/' character. This is deliberate.
|
|
||||||
set_dir_from ()
|
|
||||||
{
|
|
||||||
case $1 in
|
|
||||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
|
||||||
*) dir=;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get the suffix-stripped basename of the given path, and save it the
|
|
||||||
# global variable '$base'.
|
|
||||||
set_base_from ()
|
|
||||||
{
|
|
||||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
|
||||||
}
|
|
||||||
|
|
||||||
# If no dependency file was actually created by the compiler invocation,
|
|
||||||
# we still have to create a dummy depfile, to avoid errors with the
|
|
||||||
# Makefile "include basename.Plo" scheme.
|
|
||||||
make_dummy_depfile ()
|
|
||||||
{
|
|
||||||
echo "#dummy" > "$depfile"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Factor out some common post-processing of the generated depfile.
|
|
||||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
|
||||||
aix_post_process_depfile ()
|
|
||||||
{
|
|
||||||
# If the compiler actually managed to produce a dependency file,
|
|
||||||
# post-process it.
|
|
||||||
if test -f "$tmpdepfile"; then
|
|
||||||
# Each line is of the form 'foo.o: dependency.h'.
|
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# $object: dependency.h
|
|
||||||
# and one to simply output
|
|
||||||
# dependency.h:
|
|
||||||
# which is needed to avoid the deleted-header problem.
|
|
||||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
|
||||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
|
||||||
} > "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
else
|
|
||||||
make_dummy_depfile
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# A tabulation character.
|
|
||||||
tab=' '
|
|
||||||
# A newline character.
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
# Character ranges might be problematic outside the C locale.
|
|
||||||
# These definitions help.
|
|
||||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
||||||
lower=abcdefghijklmnopqrstuvwxyz
|
|
||||||
digits=0123456789
|
|
||||||
alpha=${upper}${lower}
|
|
||||||
|
|
||||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
|
||||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
|
||||||
depfile=${depfile-`echo "$object" |
|
|
||||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
|
||||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
|
||||||
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
|
|
||||||
# Avoid interferences from the environment.
|
|
||||||
gccflag= dashmflag=
|
|
||||||
|
|
||||||
# Some modes work just like other modes, but use different flags. We
|
|
||||||
# parameterize here, but still list the modes in the big case below,
|
|
||||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
|
||||||
# here, because this file can only contain one case statement.
|
|
||||||
if test "$depmode" = hp; then
|
|
||||||
# HP compiler uses -M and no extra arg.
|
|
||||||
gccflag=-M
|
|
||||||
depmode=gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = dashXmstdout; then
|
|
||||||
# This is just like dashmstdout with a different argument.
|
|
||||||
dashmflag=-xM
|
|
||||||
depmode=dashmstdout
|
|
||||||
fi
|
|
||||||
|
|
||||||
cygpath_u="cygpath -u -f -"
|
|
||||||
if test "$depmode" = msvcmsys; then
|
|
||||||
# This is just like msvisualcpp but w/o cygpath translation.
|
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
|
||||||
# slashes to satisfy depend.m4
|
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
|
||||||
depmode=msvisualcpp
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = msvc7msys; then
|
|
||||||
# This is just like msvc7 but w/o cygpath translation.
|
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
|
||||||
# slashes to satisfy depend.m4
|
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
|
||||||
depmode=msvc7
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$depmode" = xlc; then
|
|
||||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
|
||||||
gccflag=-qmakedep=gcc,-MF
|
|
||||||
depmode=gcc
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$depmode" in
|
|
||||||
gcc3)
|
|
||||||
## gcc 3 implements dependency tracking that does exactly what
|
|
||||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
|
||||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
|
||||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
|
||||||
## the command line argument order; so add the flags where they
|
|
||||||
## appear in depend2.am. Note that the slowdown incurred here
|
|
||||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
|
||||||
*) set fnord "$@" "$arg" ;;
|
|
||||||
esac
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
done
|
|
||||||
"$@"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
mv "$tmpdepfile" "$depfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
gcc)
|
|
||||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
|
||||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
|
||||||
## (see the conditional assignment to $gccflag above).
|
|
||||||
## There are various ways to get dependency output from gcc. Here's
|
|
||||||
## why we pick this rather obscure method:
|
|
||||||
## - Don't want to use -MD because we'd like the dependencies to end
|
|
||||||
## up in a subdir. Having to rename by hand is ugly.
|
|
||||||
## (We might end up doing this anyway to support other compilers.)
|
|
||||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
|
||||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
|
||||||
## supported by the other compilers which use the 'gcc' depmode.
|
|
||||||
## - Using -M directly means running the compiler twice (even worse
|
|
||||||
## than renaming).
|
|
||||||
if test -z "$gccflag"; then
|
|
||||||
gccflag=-MD,
|
|
||||||
fi
|
|
||||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# The second -e expression handles DOS-style file names with drive
|
|
||||||
# letters.
|
|
||||||
sed -e 's/^[^:]*: / /' \
|
|
||||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
|
||||||
## This next piece of magic avoids the "deleted header file" problem.
|
|
||||||
## The problem is that when a header file which appears in a .P file
|
|
||||||
## is deleted, the dependency causes make to die (because there is
|
|
||||||
## typically no way to rebuild the header). We avoid this by adding
|
|
||||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
|
||||||
## this for us directly.
|
|
||||||
## Some versions of gcc put a space before the ':'. On the theory
|
|
||||||
## that the space means something, we add a space to the output as
|
|
||||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
|
||||||
## to the object. Take care to not repeat it in the output.
|
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
hp)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
sgi)
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
|
||||||
else
|
|
||||||
"$@" -MDupdate "$tmpdepfile"
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
|
|
||||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# Clip off the initial element (the dependent). Don't try to be
|
|
||||||
# clever and replace this with sed code, as IRIX sed won't handle
|
|
||||||
# lines with more than a fixed number of characters (4096 in
|
|
||||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
|
||||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
|
||||||
# dependency line.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
|
||||||
| tr "$nl" ' ' >> "$depfile"
|
|
||||||
echo >> "$depfile"
|
|
||||||
# The second pass generates a dummy entry for each header file.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
|
||||||
>> "$depfile"
|
|
||||||
else
|
|
||||||
make_dummy_depfile
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
xlc)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
aix)
|
|
||||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
|
||||||
# in a .u file. In older versions, this file always lives in the
|
|
||||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
|
||||||
# start of each line; $object doesn't have directory information.
|
|
||||||
# Version 6 uses the directory in both cases.
|
|
||||||
set_dir_from "$object"
|
|
||||||
set_base_from "$object"
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
tmpdepfile1=$dir$base.u
|
|
||||||
tmpdepfile2=$base.u
|
|
||||||
tmpdepfile3=$dir.libs/$base.u
|
|
||||||
"$@" -Wc,-M
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.u
|
|
||||||
tmpdepfile2=$dir$base.u
|
|
||||||
tmpdepfile3=$dir$base.u
|
|
||||||
"$@" -M
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
aix_post_process_depfile
|
|
||||||
;;
|
|
||||||
|
|
||||||
tcc)
|
|
||||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
|
||||||
# FIXME: That version still under development at the moment of writing.
|
|
||||||
# Make that this statement remains true also for stable, released
|
|
||||||
# versions.
|
|
||||||
# It will wrap lines (doesn't matter whether long or short) with a
|
|
||||||
# trailing '\', as in:
|
|
||||||
#
|
|
||||||
# foo.o : \
|
|
||||||
# foo.c \
|
|
||||||
# foo.h \
|
|
||||||
#
|
|
||||||
# It will put a trailing '\' even on the last line, and will use leading
|
|
||||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
|
||||||
# "Emit spaces for -MD").
|
|
||||||
"$@" -MD -MF "$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
|
||||||
# We have to change lines of the first kind to '$object: \'.
|
|
||||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
|
||||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
|
||||||
# dummy dependency, to avoid the deleted-header problem.
|
|
||||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
## The order of this option in the case statement is important, since the
|
|
||||||
## shell code in configure will try each of these formats in the order
|
|
||||||
## listed in this file. A plain '-MD' option would be understood by many
|
|
||||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
|
||||||
pgcc)
|
|
||||||
# Portland's C compiler understands '-MD'.
|
|
||||||
# Will always output deps to 'file.d' where file is the root name of the
|
|
||||||
# source file under compilation, even if file resides in a subdirectory.
|
|
||||||
# The object file name does not affect the name of the '.d' file.
|
|
||||||
# pgcc 10.2 will output
|
|
||||||
# foo.o: sub/foo.c sub/foo.h
|
|
||||||
# and will wrap long lines using '\' :
|
|
||||||
# foo.o: sub/foo.c ... \
|
|
||||||
# sub/foo.h ... \
|
|
||||||
# ...
|
|
||||||
set_dir_from "$object"
|
|
||||||
# Use the source, not the object, to determine the base name, since
|
|
||||||
# that's sadly what pgcc will do too.
|
|
||||||
set_base_from "$source"
|
|
||||||
tmpdepfile=$base.d
|
|
||||||
|
|
||||||
# For projects that build the same source file twice into different object
|
|
||||||
# files, the pgcc approach of using the *source* file root name can cause
|
|
||||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
|
||||||
# the same $tmpdepfile.
|
|
||||||
lockdir=$base.d-lock
|
|
||||||
trap "
|
|
||||||
echo '$0: caught signal, cleaning up...' >&2
|
|
||||||
rmdir '$lockdir'
|
|
||||||
exit 1
|
|
||||||
" 1 2 13 15
|
|
||||||
numtries=100
|
|
||||||
i=$numtries
|
|
||||||
while test $i -gt 0; do
|
|
||||||
# mkdir is a portable test-and-set.
|
|
||||||
if mkdir "$lockdir" 2>/dev/null; then
|
|
||||||
# This process acquired the lock.
|
|
||||||
"$@" -MD
|
|
||||||
stat=$?
|
|
||||||
# Release the lock.
|
|
||||||
rmdir "$lockdir"
|
|
||||||
break
|
|
||||||
else
|
|
||||||
# If the lock is being held by a different process, wait
|
|
||||||
# until the winning process is done or we timeout.
|
|
||||||
while test -d "$lockdir" && test $i -gt 0; do
|
|
||||||
sleep 1
|
|
||||||
i=`expr $i - 1`
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
i=`expr $i - 1`
|
|
||||||
done
|
|
||||||
trap - 1 2 13 15
|
|
||||||
if test $i -le 0; then
|
|
||||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
|
||||||
echo "$0: check lockdir '$lockdir'" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
# Each line is of the form `foo.o: dependent.h',
|
|
||||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
|
||||||
# Do two passes, one to just change these to
|
|
||||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
|
||||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
|
||||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
hp2)
|
|
||||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
|
||||||
# compilers, which have integrated preprocessors. The correct option
|
|
||||||
# to use with these is +Maked; it writes dependencies to a file named
|
|
||||||
# 'foo.d', which lands next to the object file, wherever that
|
|
||||||
# happens to be.
|
|
||||||
# Much of this is similar to the tru64 case; see comments there.
|
|
||||||
set_dir_from "$object"
|
|
||||||
set_base_from "$object"
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir.libs/$base.d
|
|
||||||
"$@" -Wc,+Maked
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir$base.d
|
|
||||||
"$@" +Maked
|
|
||||||
fi
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
if test -f "$tmpdepfile"; then
|
|
||||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
|
||||||
# Add 'dependent.h:' lines.
|
|
||||||
sed -ne '2,${
|
|
||||||
s/^ *//
|
|
||||||
s/ \\*$//
|
|
||||||
s/$/:/
|
|
||||||
p
|
|
||||||
}' "$tmpdepfile" >> "$depfile"
|
|
||||||
else
|
|
||||||
make_dummy_depfile
|
|
||||||
fi
|
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
|
||||||
;;
|
|
||||||
|
|
||||||
tru64)
|
|
||||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
|
||||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
|
||||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
|
||||||
# dependencies in 'foo.d' instead, so we check for that too.
|
|
||||||
# Subdirectories are respected.
|
|
||||||
set_dir_from "$object"
|
|
||||||
set_base_from "$object"
|
|
||||||
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
|
||||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
|
||||||
# in $dir$base.o.d. We have to check for both files, because
|
|
||||||
# one of the two compilations can be disabled. We should prefer
|
|
||||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
|
||||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
|
||||||
# the former would cause a distcleancheck panic.
|
|
||||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
|
||||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
|
||||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
|
||||||
"$@" -Wc,-MD
|
|
||||||
else
|
|
||||||
tmpdepfile1=$dir$base.d
|
|
||||||
tmpdepfile2=$dir$base.d
|
|
||||||
tmpdepfile3=$dir$base.d
|
|
||||||
"$@" -MD
|
|
||||||
fi
|
|
||||||
|
|
||||||
stat=$?
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
|
|
||||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
|
||||||
do
|
|
||||||
test -f "$tmpdepfile" && break
|
|
||||||
done
|
|
||||||
# Same post-processing that is required for AIX mode.
|
|
||||||
aix_post_process_depfile
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvc7)
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
showIncludes=-Wc,-showIncludes
|
|
||||||
else
|
|
||||||
showIncludes=-showIncludes
|
|
||||||
fi
|
|
||||||
"$@" $showIncludes > "$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
|
||||||
if test $stat -ne 0; then
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# The first sed program below extracts the file names and escapes
|
|
||||||
# backslashes for cygpath. The second sed program outputs the file
|
|
||||||
# name when reading, but also accumulates all include files in the
|
|
||||||
# hold buffer in order to output them again at the end. This only
|
|
||||||
# works with sed implementations that can handle large buffers.
|
|
||||||
sed < "$tmpdepfile" -n '
|
|
||||||
/^Note: including file: *\(.*\)/ {
|
|
||||||
s//\1/
|
|
||||||
s/\\/\\\\/g
|
|
||||||
p
|
|
||||||
}' | $cygpath_u | sort -u | sed -n '
|
|
||||||
s/ /\\ /g
|
|
||||||
s/\(.*\)/'"$tab"'\1 \\/p
|
|
||||||
s/.\(.*\) \\/\1:/
|
|
||||||
H
|
|
||||||
$ {
|
|
||||||
s/.*/'"$tab"'/
|
|
||||||
G
|
|
||||||
p
|
|
||||||
}' >> "$depfile"
|
|
||||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvc7msys)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
#nosideeffect)
|
|
||||||
# This comment above is used by automake to tell side-effect
|
|
||||||
# dependency tracking mechanisms from slower ones.
|
|
||||||
|
|
||||||
dashmstdout)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout, regardless of -o.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove '-o $object'.
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
test -z "$dashmflag" && dashmflag=-M
|
|
||||||
# Require at least two characters before searching for ':'
|
|
||||||
# in the target name. This is to cope with DOS-style filenames:
|
|
||||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
|
||||||
"$@" $dashmflag |
|
|
||||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
cat < "$tmpdepfile" > "$depfile"
|
|
||||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
tr ' ' "$nl" < "$tmpdepfile" \
|
|
||||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
dashXmstdout)
|
|
||||||
# This case only exists to satisfy depend.m4. It is never actually
|
|
||||||
# run, as this mode is specially recognized in the preamble.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
makedepend)
|
|
||||||
"$@" || exit $?
|
|
||||||
# Remove any Libtool call
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
# X makedepend
|
|
||||||
shift
|
|
||||||
cleared=no eat=no
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $cleared in
|
|
||||||
no)
|
|
||||||
set ""; shift
|
|
||||||
cleared=yes ;;
|
|
||||||
esac
|
|
||||||
if test $eat = yes; then
|
|
||||||
eat=no
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
case "$arg" in
|
|
||||||
-D*|-I*)
|
|
||||||
set fnord "$@" "$arg"; shift ;;
|
|
||||||
# Strip any option that makedepend may not understand. Remove
|
|
||||||
# the object too, otherwise makedepend will parse it as a source file.
|
|
||||||
-arch)
|
|
||||||
eat=yes ;;
|
|
||||||
-*|$object)
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"; shift ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
|
||||||
touch "$tmpdepfile"
|
|
||||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
|
||||||
rm -f "$depfile"
|
|
||||||
# makedepend may prepend the VPATH from the source file name to the object.
|
|
||||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
|
||||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
|
||||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
|
||||||
# correctly. Breaking it into two sed invocations is a workaround.
|
|
||||||
sed '1,2d' "$tmpdepfile" \
|
|
||||||
| tr ' ' "$nl" \
|
|
||||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
|
||||||
;;
|
|
||||||
|
|
||||||
cpp)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove '-o $object'.
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case $arg in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift # fnord
|
|
||||||
shift # $arg
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
"$@" -E \
|
|
||||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
|
||||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
|
||||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
cat < "$tmpdepfile" >> "$depfile"
|
|
||||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvisualcpp)
|
|
||||||
# Important note: in order to support this mode, a compiler *must*
|
|
||||||
# always write the preprocessed file to stdout.
|
|
||||||
"$@" || exit $?
|
|
||||||
|
|
||||||
# Remove the call to Libtool.
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
while test "X$1" != 'X--mode=compile'; do
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
shift
|
|
||||||
fi
|
|
||||||
|
|
||||||
IFS=" "
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
case "$arg" in
|
|
||||||
-o)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
$object)
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
|
||||||
set fnord "$@"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
set fnord "$@" "$arg"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
"$@" -E 2>/dev/null |
|
|
||||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
|
||||||
echo "$tab" >> "$depfile"
|
|
||||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvcmsys)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
none)
|
|
||||||
exec "$@"
|
|
||||||
;;
|
|
||||||
|
|
||||||
*)
|
|
||||||
echo "Unknown depmode $depmode" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC0"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
|
@ -1,271 +0,0 @@
|
||||||
# iconv.m4 serial 19 (gettext-0.18.2)
|
|
||||||
dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
|
|
||||||
dnl This file is free software; the Free Software Foundation
|
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
dnl From Bruno Haible.
|
|
||||||
|
|
||||||
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
|
|
||||||
[
|
|
||||||
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
|
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
||||||
AC_REQUIRE([AC_LIB_RPATH])
|
|
||||||
|
|
||||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
|
||||||
dnl accordingly.
|
|
||||||
AC_LIB_LINKFLAGS_BODY([iconv])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([AM_ICONV_LINK],
|
|
||||||
[
|
|
||||||
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
|
||||||
dnl those with the standalone portable GNU libiconv installed).
|
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
|
||||||
|
|
||||||
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
|
|
||||||
dnl accordingly.
|
|
||||||
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
|
|
||||||
|
|
||||||
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
|
|
||||||
dnl because if the user has installed libiconv and not disabled its use
|
|
||||||
dnl via --without-libiconv-prefix, he wants to use it. The first
|
|
||||||
dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
|
|
||||||
am_save_CPPFLAGS="$CPPFLAGS"
|
|
||||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
|
|
||||||
am_cv_func_iconv="no, consider installing GNU libiconv"
|
|
||||||
am_cv_lib_iconv=no
|
|
||||||
AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <iconv.h>
|
|
||||||
]],
|
|
||||||
[[iconv_t cd = iconv_open("","");
|
|
||||||
iconv(cd,NULL,NULL,NULL,NULL);
|
|
||||||
iconv_close(cd);]])],
|
|
||||||
[am_cv_func_iconv=yes])
|
|
||||||
if test "$am_cv_func_iconv" != yes; then
|
|
||||||
am_save_LIBS="$LIBS"
|
|
||||||
LIBS="$LIBS $LIBICONV"
|
|
||||||
AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <iconv.h>
|
|
||||||
]],
|
|
||||||
[[iconv_t cd = iconv_open("","");
|
|
||||||
iconv(cd,NULL,NULL,NULL,NULL);
|
|
||||||
iconv_close(cd);]])],
|
|
||||||
[am_cv_lib_iconv=yes]
|
|
||||||
[am_cv_func_iconv=yes])
|
|
||||||
LIBS="$am_save_LIBS"
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
if test "$am_cv_func_iconv" = yes; then
|
|
||||||
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
|
|
||||||
dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
|
|
||||||
dnl Solaris 10.
|
|
||||||
am_save_LIBS="$LIBS"
|
|
||||||
if test $am_cv_lib_iconv = yes; then
|
|
||||||
LIBS="$LIBS $LIBICONV"
|
|
||||||
fi
|
|
||||||
am_cv_func_iconv_works=no
|
|
||||||
for ac_iconv_const in '' 'const'; do
|
|
||||||
AC_RUN_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[
|
|
||||||
#include <iconv.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#ifndef ICONV_CONST
|
|
||||||
# define ICONV_CONST $ac_iconv_const
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[int result = 0;
|
|
||||||
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
|
|
||||||
returns. */
|
|
||||||
{
|
|
||||||
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
|
|
||||||
if (cd_utf8_to_88591 != (iconv_t)(-1))
|
|
||||||
{
|
|
||||||
static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
|
|
||||||
char buf[10];
|
|
||||||
ICONV_CONST char *inptr = input;
|
|
||||||
size_t inbytesleft = strlen (input);
|
|
||||||
char *outptr = buf;
|
|
||||||
size_t outbytesleft = sizeof (buf);
|
|
||||||
size_t res = iconv (cd_utf8_to_88591,
|
|
||||||
&inptr, &inbytesleft,
|
|
||||||
&outptr, &outbytesleft);
|
|
||||||
if (res == 0)
|
|
||||||
result |= 1;
|
|
||||||
iconv_close (cd_utf8_to_88591);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Test against Solaris 10 bug: Failures are not distinguishable from
|
|
||||||
successful returns. */
|
|
||||||
{
|
|
||||||
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
|
|
||||||
if (cd_ascii_to_88591 != (iconv_t)(-1))
|
|
||||||
{
|
|
||||||
static ICONV_CONST char input[] = "\263";
|
|
||||||
char buf[10];
|
|
||||||
ICONV_CONST char *inptr = input;
|
|
||||||
size_t inbytesleft = strlen (input);
|
|
||||||
char *outptr = buf;
|
|
||||||
size_t outbytesleft = sizeof (buf);
|
|
||||||
size_t res = iconv (cd_ascii_to_88591,
|
|
||||||
&inptr, &inbytesleft,
|
|
||||||
&outptr, &outbytesleft);
|
|
||||||
if (res == 0)
|
|
||||||
result |= 2;
|
|
||||||
iconv_close (cd_ascii_to_88591);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* Test against AIX 6.1..7.1 bug: Buffer overrun. */
|
|
||||||
{
|
|
||||||
iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
|
|
||||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
|
||||||
{
|
|
||||||
static ICONV_CONST char input[] = "\304";
|
|
||||||
static char buf[2] = { (char)0xDE, (char)0xAD };
|
|
||||||
ICONV_CONST char *inptr = input;
|
|
||||||
size_t inbytesleft = 1;
|
|
||||||
char *outptr = buf;
|
|
||||||
size_t outbytesleft = 1;
|
|
||||||
size_t res = iconv (cd_88591_to_utf8,
|
|
||||||
&inptr, &inbytesleft,
|
|
||||||
&outptr, &outbytesleft);
|
|
||||||
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
|
|
||||||
result |= 4;
|
|
||||||
iconv_close (cd_88591_to_utf8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#if 0 /* This bug could be worked around by the caller. */
|
|
||||||
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
|
|
||||||
{
|
|
||||||
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
|
|
||||||
if (cd_88591_to_utf8 != (iconv_t)(-1))
|
|
||||||
{
|
|
||||||
static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
|
|
||||||
char buf[50];
|
|
||||||
ICONV_CONST char *inptr = input;
|
|
||||||
size_t inbytesleft = strlen (input);
|
|
||||||
char *outptr = buf;
|
|
||||||
size_t outbytesleft = sizeof (buf);
|
|
||||||
size_t res = iconv (cd_88591_to_utf8,
|
|
||||||
&inptr, &inbytesleft,
|
|
||||||
&outptr, &outbytesleft);
|
|
||||||
if ((int)res > 0)
|
|
||||||
result |= 8;
|
|
||||||
iconv_close (cd_88591_to_utf8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
|
|
||||||
provided. */
|
|
||||||
if (/* Try standardized names. */
|
|
||||||
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
|
|
||||||
/* Try IRIX, OSF/1 names. */
|
|
||||||
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
|
|
||||||
/* Try AIX names. */
|
|
||||||
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
|
|
||||||
/* Try HP-UX names. */
|
|
||||||
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
|
|
||||||
result |= 16;
|
|
||||||
return result;
|
|
||||||
]])],
|
|
||||||
[am_cv_func_iconv_works=yes], ,
|
|
||||||
[case "$host_os" in
|
|
||||||
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
|
|
||||||
*) am_cv_func_iconv_works="guessing yes" ;;
|
|
||||||
esac])
|
|
||||||
test "$am_cv_func_iconv_works" = no || break
|
|
||||||
done
|
|
||||||
LIBS="$am_save_LIBS"
|
|
||||||
])
|
|
||||||
case "$am_cv_func_iconv_works" in
|
|
||||||
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
|
|
||||||
*) am_func_iconv=yes ;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
am_func_iconv=no am_cv_lib_iconv=no
|
|
||||||
fi
|
|
||||||
if test "$am_func_iconv" = yes; then
|
|
||||||
AC_DEFINE([HAVE_ICONV], [1],
|
|
||||||
[Define if you have the iconv() function and it works.])
|
|
||||||
fi
|
|
||||||
if test "$am_cv_lib_iconv" = yes; then
|
|
||||||
AC_MSG_CHECKING([how to link with libiconv])
|
|
||||||
AC_MSG_RESULT([$LIBICONV])
|
|
||||||
else
|
|
||||||
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
|
|
||||||
dnl either.
|
|
||||||
CPPFLAGS="$am_save_CPPFLAGS"
|
|
||||||
LIBICONV=
|
|
||||||
LTLIBICONV=
|
|
||||||
fi
|
|
||||||
AC_SUBST([LIBICONV])
|
|
||||||
AC_SUBST([LTLIBICONV])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
|
|
||||||
dnl avoid warnings like
|
|
||||||
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
|
|
||||||
dnl This is tricky because of the way 'aclocal' is implemented:
|
|
||||||
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
|
|
||||||
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
|
|
||||||
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
|
|
||||||
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
|
|
||||||
dnl warnings.
|
|
||||||
m4_define([gl_iconv_AC_DEFUN],
|
|
||||||
m4_version_prereq([2.64],
|
|
||||||
[[AC_DEFUN_ONCE(
|
|
||||||
[$1], [$2])]],
|
|
||||||
[m4_ifdef([gl_00GNULIB],
|
|
||||||
[[AC_DEFUN_ONCE(
|
|
||||||
[$1], [$2])]],
|
|
||||||
[[AC_DEFUN(
|
|
||||||
[$1], [$2])]])]))
|
|
||||||
gl_iconv_AC_DEFUN([AM_ICONV],
|
|
||||||
[
|
|
||||||
AM_ICONV_LINK
|
|
||||||
if test "$am_cv_func_iconv" = yes; then
|
|
||||||
AC_MSG_CHECKING([for iconv declaration])
|
|
||||||
AC_CACHE_VAL([am_cv_proto_iconv], [
|
|
||||||
AC_COMPILE_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM(
|
|
||||||
[[
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <iconv.h>
|
|
||||||
extern
|
|
||||||
#ifdef __cplusplus
|
|
||||||
"C"
|
|
||||||
#endif
|
|
||||||
#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
|
|
||||||
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
|
||||||
#else
|
|
||||||
size_t iconv();
|
|
||||||
#endif
|
|
||||||
]],
|
|
||||||
[[]])],
|
|
||||||
[am_cv_proto_iconv_arg1=""],
|
|
||||||
[am_cv_proto_iconv_arg1="const"])
|
|
||||||
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
|
||||||
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
|
||||||
AC_MSG_RESULT([
|
|
||||||
$am_cv_proto_iconv])
|
|
||||||
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
|
|
||||||
[Define as const if the declaration of iconv() needs const.])
|
|
||||||
dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
|
|
||||||
m4_ifdef([gl_ICONV_H_DEFAULTS],
|
|
||||||
[AC_REQUIRE([gl_ICONV_H_DEFAULTS])
|
|
||||||
if test -n "$am_cv_proto_iconv_arg1"; then
|
|
||||||
ICONV_CONST="const"
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
fi
|
|
||||||
])
|
|
|
@ -1,541 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# install - install a program, script, or datafile
|
|
||||||
|
|
||||||
scriptversion=2020-11-14.01; # UTC
|
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
|
||||||
# following copyright and license.
|
|
||||||
#
|
|
||||||
# Copyright (C) 1994 X Consortium
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
# of this software and associated documentation files (the "Software"), to
|
|
||||||
# deal in the Software without restriction, including without limitation the
|
|
||||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
||||||
# sell copies of the Software, and to permit persons to whom the Software is
|
|
||||||
# furnished to do so, subject to the following conditions:
|
|
||||||
#
|
|
||||||
# The above copyright notice and this permission notice shall be included in
|
|
||||||
# all copies or substantial portions of the Software.
|
|
||||||
#
|
|
||||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
|
||||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
#
|
|
||||||
# Except as contained in this notice, the name of the X Consortium shall not
|
|
||||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
|
||||||
# ings in this Software without prior written authorization from the X Consor-
|
|
||||||
# tium.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# FSF changes to this file are in the public domain.
|
|
||||||
#
|
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
|
||||||
# 'make' implicit rules from creating a file called install from it
|
|
||||||
# when there is no Makefile.
|
|
||||||
#
|
|
||||||
# This script is compatible with the BSD install script, but was written
|
|
||||||
# from scratch.
|
|
||||||
|
|
||||||
tab=' '
|
|
||||||
nl='
|
|
||||||
'
|
|
||||||
IFS=" $tab$nl"
|
|
||||||
|
|
||||||
# Set DOITPROG to "echo" to test this script.
|
|
||||||
|
|
||||||
doit=${DOITPROG-}
|
|
||||||
doit_exec=${doit:-exec}
|
|
||||||
|
|
||||||
# Put in absolute file names if you don't have them in your path;
|
|
||||||
# or use environment vars.
|
|
||||||
|
|
||||||
chgrpprog=${CHGRPPROG-chgrp}
|
|
||||||
chmodprog=${CHMODPROG-chmod}
|
|
||||||
chownprog=${CHOWNPROG-chown}
|
|
||||||
cmpprog=${CMPPROG-cmp}
|
|
||||||
cpprog=${CPPROG-cp}
|
|
||||||
mkdirprog=${MKDIRPROG-mkdir}
|
|
||||||
mvprog=${MVPROG-mv}
|
|
||||||
rmprog=${RMPROG-rm}
|
|
||||||
stripprog=${STRIPPROG-strip}
|
|
||||||
|
|
||||||
posix_mkdir=
|
|
||||||
|
|
||||||
# Desired mode of installed file.
|
|
||||||
mode=0755
|
|
||||||
|
|
||||||
# Create dirs (including intermediate dirs) using mode 755.
|
|
||||||
# This is like GNU 'install' as of coreutils 8.32 (2020).
|
|
||||||
mkdir_umask=22
|
|
||||||
|
|
||||||
backupsuffix=
|
|
||||||
chgrpcmd=
|
|
||||||
chmodcmd=$chmodprog
|
|
||||||
chowncmd=
|
|
||||||
mvcmd=$mvprog
|
|
||||||
rmcmd="$rmprog -f"
|
|
||||||
stripcmd=
|
|
||||||
|
|
||||||
src=
|
|
||||||
dst=
|
|
||||||
dir_arg=
|
|
||||||
dst_arg=
|
|
||||||
|
|
||||||
copy_on_change=false
|
|
||||||
is_target_a_directory=possibly
|
|
||||||
|
|
||||||
usage="\
|
|
||||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
|
||||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
|
||||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
|
||||||
or: $0 [OPTION]... -d DIRECTORIES...
|
|
||||||
|
|
||||||
In the 1st form, copy SRCFILE to DSTFILE.
|
|
||||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
|
||||||
In the 4th, create DIRECTORIES.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
--help display this help and exit.
|
|
||||||
--version display version info and exit.
|
|
||||||
|
|
||||||
-c (ignored)
|
|
||||||
-C install only if different (preserve data modification time)
|
|
||||||
-d create directories instead of installing files.
|
|
||||||
-g GROUP $chgrpprog installed files to GROUP.
|
|
||||||
-m MODE $chmodprog installed files to MODE.
|
|
||||||
-o USER $chownprog installed files to USER.
|
|
||||||
-p pass -p to $cpprog.
|
|
||||||
-s $stripprog installed files.
|
|
||||||
-S SUFFIX attempt to back up existing files, with suffix SUFFIX.
|
|
||||||
-t DIRECTORY install into DIRECTORY.
|
|
||||||
-T report an error if DSTFILE is a directory.
|
|
||||||
|
|
||||||
Environment variables override the default commands:
|
|
||||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
|
||||||
RMPROG STRIPPROG
|
|
||||||
|
|
||||||
By default, rm is invoked with -f; when overridden with RMPROG,
|
|
||||||
it's up to you to specify -f if you want it.
|
|
||||||
|
|
||||||
If -S is not specified, no backups are attempted.
|
|
||||||
|
|
||||||
Email bug reports to bug-automake@gnu.org.
|
|
||||||
Automake home page: https://www.gnu.org/software/automake/
|
|
||||||
"
|
|
||||||
|
|
||||||
while test $# -ne 0; do
|
|
||||||
case $1 in
|
|
||||||
-c) ;;
|
|
||||||
|
|
||||||
-C) copy_on_change=true;;
|
|
||||||
|
|
||||||
-d) dir_arg=true;;
|
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
--help) echo "$usage"; exit $?;;
|
|
||||||
|
|
||||||
-m) mode=$2
|
|
||||||
case $mode in
|
|
||||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
|
||||||
echo "$0: invalid mode: $mode" >&2
|
|
||||||
exit 1;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-p) cpprog="$cpprog -p";;
|
|
||||||
|
|
||||||
-s) stripcmd=$stripprog;;
|
|
||||||
|
|
||||||
-S) backupsuffix="$2"
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-t)
|
|
||||||
is_target_a_directory=always
|
|
||||||
dst_arg=$2
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
shift;;
|
|
||||||
|
|
||||||
-T) is_target_a_directory=never;;
|
|
||||||
|
|
||||||
--version) echo "$0 $scriptversion"; exit $?;;
|
|
||||||
|
|
||||||
--) shift
|
|
||||||
break;;
|
|
||||||
|
|
||||||
-*) echo "$0: invalid option: $1" >&2
|
|
||||||
exit 1;;
|
|
||||||
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
# We allow the use of options -d and -T together, by making -d
|
|
||||||
# take the precedence; this is for compatibility with GNU install.
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
echo "$0: target directory not allowed when installing a directory." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
|
||||||
# When -d is used, all remaining arguments are directories to create.
|
|
||||||
# When -t is used, the destination is already specified.
|
|
||||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
|
||||||
for arg
|
|
||||||
do
|
|
||||||
if test -n "$dst_arg"; then
|
|
||||||
# $@ is not empty: it contains at least $arg.
|
|
||||||
set fnord "$@" "$dst_arg"
|
|
||||||
shift # fnord
|
|
||||||
fi
|
|
||||||
shift # arg
|
|
||||||
dst_arg=$arg
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
echo "$0: no input file specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# It's OK to call 'install-sh -d' without argument.
|
|
||||||
# This can happen when creating conditional directories.
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
|
||||||
if test ! -d "$dst_arg"; then
|
|
||||||
echo "$0: $dst_arg: Is not a directory." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
|
||||||
do_exit='(exit $ret); exit $ret'
|
|
||||||
trap "ret=129; $do_exit" 1
|
|
||||||
trap "ret=130; $do_exit" 2
|
|
||||||
trap "ret=141; $do_exit" 13
|
|
||||||
trap "ret=143; $do_exit" 15
|
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
|
||||||
# However, 'strip' requires both read and write access to temps.
|
|
||||||
case $mode in
|
|
||||||
# Optimize common cases.
|
|
||||||
*644) cp_umask=133;;
|
|
||||||
*755) cp_umask=22;;
|
|
||||||
|
|
||||||
*[0-7])
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw='% 200'
|
|
||||||
fi
|
|
||||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
|
||||||
*)
|
|
||||||
if test -z "$stripcmd"; then
|
|
||||||
u_plus_rw=
|
|
||||||
else
|
|
||||||
u_plus_rw=,u+rw
|
|
||||||
fi
|
|
||||||
cp_umask=$mode$u_plus_rw;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
for src
|
|
||||||
do
|
|
||||||
# Protect names problematic for 'test' and other utilities.
|
|
||||||
case $src in
|
|
||||||
-* | [=\(\)!]) src=./$src;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
dst=$src
|
|
||||||
dstdir=$dst
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
# Don't chown directories that already exist.
|
|
||||||
if test $dstdir_status = 0; then
|
|
||||||
chowncmd=""
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
|
||||||
# might cause directories to be created, which would be especially bad
|
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
|
||||||
if test ! -f "$src" && test ! -d "$src"; then
|
|
||||||
echo "$0: $src does not exist." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -z "$dst_arg"; then
|
|
||||||
echo "$0: no destination specified." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dst=$dst_arg
|
|
||||||
|
|
||||||
# If destination is a directory, append the input filename.
|
|
||||||
if test -d "$dst"; then
|
|
||||||
if test "$is_target_a_directory" = never; then
|
|
||||||
echo "$0: $dst_arg: Is a directory" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
dstdir=$dst
|
|
||||||
dstbase=`basename "$src"`
|
|
||||||
case $dst in
|
|
||||||
*/) dst=$dst$dstbase;;
|
|
||||||
*) dst=$dst/$dstbase;;
|
|
||||||
esac
|
|
||||||
dstdir_status=0
|
|
||||||
else
|
|
||||||
dstdir=`dirname "$dst"`
|
|
||||||
test -d "$dstdir"
|
|
||||||
dstdir_status=$?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
*/) dstdirslash=$dstdir;;
|
|
||||||
*) dstdirslash=$dstdir/;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
obsolete_mkdir_used=false
|
|
||||||
|
|
||||||
if test $dstdir_status != 0; then
|
|
||||||
case $posix_mkdir in
|
|
||||||
'')
|
|
||||||
# With -d, create the new directory with the user-specified mode.
|
|
||||||
# Otherwise, rely on $mkdir_umask.
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
mkdir_mode=-m$mode
|
|
||||||
else
|
|
||||||
mkdir_mode=
|
|
||||||
fi
|
|
||||||
|
|
||||||
posix_mkdir=false
|
|
||||||
# The $RANDOM variable is not portable (e.g., dash). Use it
|
|
||||||
# here however when possible just to lower collision chance.
|
|
||||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
|
||||||
|
|
||||||
trap '
|
|
||||||
ret=$?
|
|
||||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
|
|
||||||
exit $ret
|
|
||||||
' 0
|
|
||||||
|
|
||||||
# Because "mkdir -p" follows existing symlinks and we likely work
|
|
||||||
# directly in world-writeable /tmp, make sure that the '$tmpdir'
|
|
||||||
# directory is successfully created first before we actually test
|
|
||||||
# 'mkdir -p'.
|
|
||||||
if (umask $mkdir_umask &&
|
|
||||||
$mkdirprog $mkdir_mode "$tmpdir" &&
|
|
||||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
if test -z "$dir_arg" || {
|
|
||||||
# Check for POSIX incompatibilities with -m.
|
|
||||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
|
||||||
# other-writable bit of parent directory when it shouldn't.
|
|
||||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
|
||||||
test_tmpdir="$tmpdir/a"
|
|
||||||
ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
|
|
||||||
case $ls_ld_tmpdir in
|
|
||||||
d????-?r-*) different_mode=700;;
|
|
||||||
d????-?--*) different_mode=755;;
|
|
||||||
*) false;;
|
|
||||||
esac &&
|
|
||||||
$mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
|
|
||||||
ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
|
|
||||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
then posix_mkdir=:
|
|
||||||
fi
|
|
||||||
rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
|
|
||||||
else
|
|
||||||
# Remove any dirs left behind by ancient mkdir implementations.
|
|
||||||
rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
|
|
||||||
fi
|
|
||||||
trap '' 0;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if
|
|
||||||
$posix_mkdir && (
|
|
||||||
umask $mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
|
||||||
)
|
|
||||||
then :
|
|
||||||
else
|
|
||||||
|
|
||||||
# mkdir does not conform to POSIX,
|
|
||||||
# or it failed possibly due to a race condition. Create the
|
|
||||||
# directory the slow way, step by step, checking for races as we go.
|
|
||||||
|
|
||||||
case $dstdir in
|
|
||||||
/*) prefix='/';;
|
|
||||||
[-=\(\)!]*) prefix='./';;
|
|
||||||
*) prefix='';;
|
|
||||||
esac
|
|
||||||
|
|
||||||
oIFS=$IFS
|
|
||||||
IFS=/
|
|
||||||
set -f
|
|
||||||
set fnord $dstdir
|
|
||||||
shift
|
|
||||||
set +f
|
|
||||||
IFS=$oIFS
|
|
||||||
|
|
||||||
prefixes=
|
|
||||||
|
|
||||||
for d
|
|
||||||
do
|
|
||||||
test X"$d" = X && continue
|
|
||||||
|
|
||||||
prefix=$prefix$d
|
|
||||||
if test -d "$prefix"; then
|
|
||||||
prefixes=
|
|
||||||
else
|
|
||||||
if $posix_mkdir; then
|
|
||||||
(umask $mkdir_umask &&
|
|
||||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
test -d "$prefix" || exit 1
|
|
||||||
else
|
|
||||||
case $prefix in
|
|
||||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
|
||||||
*) qprefix=$prefix;;
|
|
||||||
esac
|
|
||||||
prefixes="$prefixes '$qprefix'"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
prefix=$prefix/
|
|
||||||
done
|
|
||||||
|
|
||||||
if test -n "$prefixes"; then
|
|
||||||
# Don't fail if two instances are running concurrently.
|
|
||||||
(umask $mkdir_umask &&
|
|
||||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
|
||||||
test -d "$dstdir" || exit 1
|
|
||||||
obsolete_mkdir_used=true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
|
||||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
|
||||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
|
||||||
else
|
|
||||||
|
|
||||||
# Make a couple of temp file names in the proper directory.
|
|
||||||
dsttmp=${dstdirslash}_inst.$$_
|
|
||||||
rmtmp=${dstdirslash}_rm.$$_
|
|
||||||
|
|
||||||
# Trap to clean up those temp files at exit.
|
|
||||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
|
||||||
|
|
||||||
# Copy the file name to the temp name.
|
|
||||||
(umask $cp_umask &&
|
|
||||||
{ test -z "$stripcmd" || {
|
|
||||||
# Create $dsttmp read-write so that cp doesn't create it read-only,
|
|
||||||
# which would cause strip to fail.
|
|
||||||
if test -z "$doit"; then
|
|
||||||
: >"$dsttmp" # No need to fork-exec 'touch'.
|
|
||||||
else
|
|
||||||
$doit touch "$dsttmp"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
} &&
|
|
||||||
$doit_exec $cpprog "$src" "$dsttmp") &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits.
|
|
||||||
#
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to
|
|
||||||
# ignore errors from any of these, just make sure not to ignore
|
|
||||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
|
||||||
#
|
|
||||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
|
||||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
|
||||||
|
|
||||||
# If -C, don't bother to copy if it wouldn't change the file.
|
|
||||||
if $copy_on_change &&
|
|
||||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
|
||||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
|
||||||
set -f &&
|
|
||||||
set X $old && old=:$2:$4:$5:$6 &&
|
|
||||||
set X $new && new=:$2:$4:$5:$6 &&
|
|
||||||
set +f &&
|
|
||||||
test "$old" = "$new" &&
|
|
||||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
rm -f "$dsttmp"
|
|
||||||
else
|
|
||||||
# If $backupsuffix is set, and the file being installed
|
|
||||||
# already exists, attempt a backup. Don't worry if it fails,
|
|
||||||
# e.g., if mv doesn't support -f.
|
|
||||||
if test -n "$backupsuffix" && test -f "$dst"; then
|
|
||||||
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Rename the file to the real destination.
|
|
||||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
|
||||||
|
|
||||||
# The rename failed, perhaps because mv can't rename something else
|
|
||||||
# to itself, or perhaps because mv is so ancient that it does not
|
|
||||||
# support -f.
|
|
||||||
{
|
|
||||||
# Now remove or move aside any old file at destination location.
|
|
||||||
# We try this two ways since rm can't unlink itself on some
|
|
||||||
# systems and the destination file might be busy for other
|
|
||||||
# reasons. In this case, the final cleanup might fail but the new
|
|
||||||
# file should still install successfully.
|
|
||||||
{
|
|
||||||
test ! -f "$dst" ||
|
|
||||||
$doit $rmcmd "$dst" 2>/dev/null ||
|
|
||||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
|
||||||
{ $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
|
|
||||||
} ||
|
|
||||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
|
||||||
(exit 1); exit 1
|
|
||||||
}
|
|
||||||
} &&
|
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
$doit $mvcmd "$dsttmp" "$dst"
|
|
||||||
}
|
|
||||||
fi || exit 1
|
|
||||||
|
|
||||||
trap '' 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC0"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
|
@ -1,20 +0,0 @@
|
||||||
# la_TYPE_UID_T
|
|
||||||
# -------------
|
|
||||||
AC_DEFUN([la_TYPE_UID_T],
|
|
||||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
||||||
AC_CACHE_CHECK(for uid_t in sys/types.h, la_cv_type_uid_t,
|
|
||||||
[AC_EGREP_HEADER(uid_t, sys/types.h,
|
|
||||||
la_cv_type_uid_t=yes, la_cv_type_uid_t=no)])
|
|
||||||
if test $la_cv_type_uid_t = no; then
|
|
||||||
case $host in
|
|
||||||
*mingw*) def_uid_t=short ;;
|
|
||||||
*) def_uid_t=int ;;
|
|
||||||
esac
|
|
||||||
AC_DEFINE_UNQUOTED(uid_t, [$def_uid_t],
|
|
||||||
[Define to match typeof st_uid field of struct stat if <sys/types.h> doesn't define.])
|
|
||||||
AC_DEFINE_UNQUOTED(gid_t, [$def_uid_t],
|
|
||||||
[Define to match typeof st_gid field of struct stat if <sys/types.h> doesn't define.])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
AU_ALIAS([AC_TYPE_UID_T], [la_TYPE_UID_T])
|
|
||||||
|
|
|
@ -1,109 +0,0 @@
|
||||||
# lib-ld.m4 serial 5 (gettext-0.18.2)
|
|
||||||
dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc.
|
|
||||||
dnl This file is free software; the Free Software Foundation
|
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
dnl Subroutines of libtool.m4,
|
|
||||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
|
||||||
dnl with libtool.m4.
|
|
||||||
|
|
||||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
|
||||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
|
||||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
|
|
||||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
|
||||||
case `$LD -v 2>&1 </dev/null` in
|
|
||||||
*GNU* | *'with BFD'*)
|
|
||||||
acl_cv_prog_gnu_ld=yes ;;
|
|
||||||
*)
|
|
||||||
acl_cv_prog_gnu_ld=no ;;
|
|
||||||
esac])
|
|
||||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl From libtool-1.4. Sets the variable LD.
|
|
||||||
AC_DEFUN([AC_LIB_PROG_LD],
|
|
||||||
[AC_ARG_WITH([gnu-ld],
|
|
||||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
|
||||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
|
||||||
AC_REQUIRE([AC_PROG_CC])dnl
|
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
||||||
# Prepare PATH_SEPARATOR.
|
|
||||||
# The user is always right.
|
|
||||||
if test "${PATH_SEPARATOR+set}" != set; then
|
|
||||||
# Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
|
|
||||||
# contains only /bin. Note that ksh looks also at the FPATH variable,
|
|
||||||
# so we have to set that as well for the test.
|
|
||||||
PATH_SEPARATOR=:
|
|
||||||
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
|
||||||
&& { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
|
|
||||||
|| PATH_SEPARATOR=';'
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
ac_prog=ld
|
|
||||||
if test "$GCC" = yes; then
|
|
||||||
# Check if gcc -print-prog-name=ld gives a path.
|
|
||||||
AC_MSG_CHECKING([for ld used by GCC])
|
|
||||||
case $host in
|
|
||||||
*-*-mingw*)
|
|
||||||
# gcc leaves a trailing carriage return which upsets mingw
|
|
||||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
|
||||||
*)
|
|
||||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
|
||||||
esac
|
|
||||||
case $ac_prog in
|
|
||||||
# Accept absolute paths.
|
|
||||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
|
||||||
[re_direlt='/[^/][^/]*/\.\./']
|
|
||||||
# Canonicalize the path of ld
|
|
||||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
|
||||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
|
||||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
|
||||||
done
|
|
||||||
test -z "$LD" && LD="$ac_prog"
|
|
||||||
;;
|
|
||||||
"")
|
|
||||||
# If it fails, then pretend we aren't using GCC.
|
|
||||||
ac_prog=ld
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# If it is relative, then search for the first ld in PATH.
|
|
||||||
with_gnu_ld=unknown
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
elif test "$with_gnu_ld" = yes; then
|
|
||||||
AC_MSG_CHECKING([for GNU ld])
|
|
||||||
else
|
|
||||||
AC_MSG_CHECKING([for non-GNU ld])
|
|
||||||
fi
|
|
||||||
AC_CACHE_VAL([acl_cv_path_LD],
|
|
||||||
[if test -z "$LD"; then
|
|
||||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
|
||||||
for ac_dir in $PATH; do
|
|
||||||
test -z "$ac_dir" && ac_dir=.
|
|
||||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
|
||||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
|
||||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
|
||||||
# but apparently some GNU ld's only accept -v.
|
|
||||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
|
||||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
|
||||||
*GNU* | *'with BFD'*)
|
|
||||||
test "$with_gnu_ld" != no && break ;;
|
|
||||||
*)
|
|
||||||
test "$with_gnu_ld" != yes && break ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS="$ac_save_ifs"
|
|
||||||
else
|
|
||||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
|
||||||
fi])
|
|
||||||
LD="$acl_cv_path_LD"
|
|
||||||
if test -n "$LD"; then
|
|
||||||
AC_MSG_RESULT([$LD])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT([no])
|
|
||||||
fi
|
|
||||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
|
||||||
AC_LIB_PROG_LD_GNU
|
|
||||||
])
|
|
|
@ -1,777 +0,0 @@
|
||||||
# lib-link.m4 serial 26 (gettext-0.18.2)
|
|
||||||
dnl Copyright (C) 2001-2011 Free Software Foundation, Inc.
|
|
||||||
dnl This file is free software; the Free Software Foundation
|
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
dnl From Bruno Haible.
|
|
||||||
|
|
||||||
AC_PREREQ([2.54])
|
|
||||||
|
|
||||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
|
||||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
|
||||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
|
||||||
dnl augments the CPPFLAGS variable.
|
|
||||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
|
||||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
|
||||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
|
||||||
[
|
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
||||||
AC_REQUIRE([AC_LIB_RPATH])
|
|
||||||
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
|
||||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
|
||||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
|
||||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
|
||||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
|
||||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
|
||||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
|
||||||
ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
|
|
||||||
])
|
|
||||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
|
||||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
|
||||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
|
||||||
LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
|
|
||||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
|
||||||
AC_SUBST([LIB]NAME)
|
|
||||||
AC_SUBST([LTLIB]NAME)
|
|
||||||
AC_SUBST([LIB]NAME[_PREFIX])
|
|
||||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
|
||||||
dnl results of this search when this library appears as a dependency.
|
|
||||||
HAVE_LIB[]NAME=yes
|
|
||||||
popdef([NAME])
|
|
||||||
popdef([Name])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
|
|
||||||
dnl searches for libname and the libraries corresponding to explicit and
|
|
||||||
dnl implicit dependencies, together with the specified include files and
|
|
||||||
dnl the ability to compile and link the specified testcode. The missing-message
|
|
||||||
dnl defaults to 'no' and may contain additional hints for the user.
|
|
||||||
dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
|
|
||||||
dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
|
||||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
|
||||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
|
||||||
dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
|
|
||||||
dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
|
||||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
|
||||||
[
|
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
||||||
AC_REQUIRE([AC_LIB_RPATH])
|
|
||||||
pushdef([Name],[m4_translit([$1],[./+-], [____])])
|
|
||||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
|
||||||
|
|
||||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
|
||||||
dnl accordingly.
|
|
||||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
|
||||||
|
|
||||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
|
||||||
dnl because if the user has installed lib[]Name and not disabled its use
|
|
||||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
|
||||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
|
||||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
|
||||||
|
|
||||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
|
||||||
ac_save_LIBS="$LIBS"
|
|
||||||
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
|
|
||||||
dnl because these -l options might require -L options that are present in
|
|
||||||
dnl LIBS. -l options benefit only from the -L options listed before it.
|
|
||||||
dnl Otherwise, add it to the front of LIBS, because it may be a static
|
|
||||||
dnl library that depends on another static library that is present in LIBS.
|
|
||||||
dnl Static libraries benefit only from the static libraries listed after
|
|
||||||
dnl it.
|
|
||||||
case " $LIB[]NAME" in
|
|
||||||
*" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
|
|
||||||
*) LIBS="$LIB[]NAME $LIBS" ;;
|
|
||||||
esac
|
|
||||||
AC_LINK_IFELSE(
|
|
||||||
[AC_LANG_PROGRAM([[$3]], [[$4]])],
|
|
||||||
[ac_cv_lib[]Name=yes],
|
|
||||||
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
|
|
||||||
LIBS="$ac_save_LIBS"
|
|
||||||
])
|
|
||||||
if test "$ac_cv_lib[]Name" = yes; then
|
|
||||||
HAVE_LIB[]NAME=yes
|
|
||||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
|
|
||||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
|
||||||
AC_MSG_RESULT([$LIB[]NAME])
|
|
||||||
else
|
|
||||||
HAVE_LIB[]NAME=no
|
|
||||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
|
||||||
dnl $INC[]NAME either.
|
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
|
||||||
LIB[]NAME=
|
|
||||||
LTLIB[]NAME=
|
|
||||||
LIB[]NAME[]_PREFIX=
|
|
||||||
fi
|
|
||||||
AC_SUBST([HAVE_LIB]NAME)
|
|
||||||
AC_SUBST([LIB]NAME)
|
|
||||||
AC_SUBST([LTLIB]NAME)
|
|
||||||
AC_SUBST([LIB]NAME[_PREFIX])
|
|
||||||
popdef([NAME])
|
|
||||||
popdef([Name])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl Determine the platform dependent parameters needed to use rpath:
|
|
||||||
dnl acl_libext,
|
|
||||||
dnl acl_shlibext,
|
|
||||||
dnl acl_libname_spec,
|
|
||||||
dnl acl_library_names_spec,
|
|
||||||
dnl acl_hardcode_libdir_flag_spec,
|
|
||||||
dnl acl_hardcode_libdir_separator,
|
|
||||||
dnl acl_hardcode_direct,
|
|
||||||
dnl acl_hardcode_minus_L.
|
|
||||||
AC_DEFUN([AC_LIB_RPATH],
|
|
||||||
[
|
|
||||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
|
||||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
|
||||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
|
||||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
|
||||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
|
||||||
AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
|
|
||||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
|
||||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
|
||||||
. ./conftest.sh
|
|
||||||
rm -f ./conftest.sh
|
|
||||||
acl_cv_rpath=done
|
|
||||||
])
|
|
||||||
wl="$acl_cv_wl"
|
|
||||||
acl_libext="$acl_cv_libext"
|
|
||||||
acl_shlibext="$acl_cv_shlibext"
|
|
||||||
acl_libname_spec="$acl_cv_libname_spec"
|
|
||||||
acl_library_names_spec="$acl_cv_library_names_spec"
|
|
||||||
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
|
||||||
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
|
||||||
acl_hardcode_direct="$acl_cv_hardcode_direct"
|
|
||||||
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
|
||||||
dnl Determine whether the user wants rpath handling at all.
|
|
||||||
AC_ARG_ENABLE([rpath],
|
|
||||||
[ --disable-rpath do not hardcode runtime library paths],
|
|
||||||
:, enable_rpath=yes)
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AC_LIB_FROMPACKAGE(name, package)
|
|
||||||
dnl declares that libname comes from the given package. The configure file
|
|
||||||
dnl will then not have a --with-libname-prefix option but a
|
|
||||||
dnl --with-package-prefix option. Several libraries can come from the same
|
|
||||||
dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
|
|
||||||
dnl macro call that searches for libname.
|
|
||||||
AC_DEFUN([AC_LIB_FROMPACKAGE],
|
|
||||||
[
|
|
||||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
|
||||||
define([acl_frompackage_]NAME, [$2])
|
|
||||||
popdef([NAME])
|
|
||||||
pushdef([PACK],[$2])
|
|
||||||
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
|
||||||
define([acl_libsinpackage_]PACKUP,
|
|
||||||
m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
|
|
||||||
popdef([PACKUP])
|
|
||||||
popdef([PACK])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
|
||||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
|
||||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
|
||||||
dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
|
|
||||||
dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
|
|
||||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
|
||||||
[
|
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
|
||||||
pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
|
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
|
||||||
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
|
|
||||||
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
|
|
||||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
|
|
||||||
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
|
|
||||||
dnl Autoconf >= 2.61 supports dots in --with options.
|
|
||||||
pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
|
|
||||||
dnl By default, look in $includedir and $libdir.
|
|
||||||
use_additional=yes
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([
|
|
||||||
eval additional_includedir=\"$includedir\"
|
|
||||||
eval additional_libdir=\"$libdir\"
|
|
||||||
])
|
|
||||||
AC_ARG_WITH(P_A_C_K[-prefix],
|
|
||||||
[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
|
|
||||||
--without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
|
|
||||||
[
|
|
||||||
if test "X$withval" = "Xno"; then
|
|
||||||
use_additional=no
|
|
||||||
else
|
|
||||||
if test "X$withval" = "X"; then
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([
|
|
||||||
eval additional_includedir=\"$includedir\"
|
|
||||||
eval additional_libdir=\"$libdir\"
|
|
||||||
])
|
|
||||||
else
|
|
||||||
additional_includedir="$withval/include"
|
|
||||||
additional_libdir="$withval/$acl_libdirstem"
|
|
||||||
if test "$acl_libdirstem2" != "$acl_libdirstem" \
|
|
||||||
&& ! test -d "$withval/$acl_libdirstem"; then
|
|
||||||
additional_libdir="$withval/$acl_libdirstem2"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
dnl Search the library and its dependencies in $additional_libdir and
|
|
||||||
dnl $LDFLAGS. Using breadth-first-seach.
|
|
||||||
LIB[]NAME=
|
|
||||||
LTLIB[]NAME=
|
|
||||||
INC[]NAME=
|
|
||||||
LIB[]NAME[]_PREFIX=
|
|
||||||
dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
|
|
||||||
dnl computed. So it has to be reset here.
|
|
||||||
HAVE_LIB[]NAME=
|
|
||||||
rpathdirs=
|
|
||||||
ltrpathdirs=
|
|
||||||
names_already_handled=
|
|
||||||
names_next_round='$1 $2'
|
|
||||||
while test -n "$names_next_round"; do
|
|
||||||
names_this_round="$names_next_round"
|
|
||||||
names_next_round=
|
|
||||||
for name in $names_this_round; do
|
|
||||||
already_handled=
|
|
||||||
for n in $names_already_handled; do
|
|
||||||
if test "$n" = "$name"; then
|
|
||||||
already_handled=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$already_handled"; then
|
|
||||||
names_already_handled="$names_already_handled $name"
|
|
||||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
|
||||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
|
||||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
|
|
||||||
eval value=\"\$HAVE_LIB$uppername\"
|
|
||||||
if test -n "$value"; then
|
|
||||||
if test "$value" = yes; then
|
|
||||||
eval value=\"\$LIB$uppername\"
|
|
||||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
|
||||||
eval value=\"\$LTLIB$uppername\"
|
|
||||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
|
||||||
else
|
|
||||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
|
||||||
dnl that this library doesn't exist. So just drop it.
|
|
||||||
:
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
|
||||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
|
||||||
found_dir=
|
|
||||||
found_la=
|
|
||||||
found_so=
|
|
||||||
found_a=
|
|
||||||
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
|
|
||||||
if test -n "$acl_shlibext"; then
|
|
||||||
shrext=".$acl_shlibext" # typically: shrext=.so
|
|
||||||
else
|
|
||||||
shrext=
|
|
||||||
fi
|
|
||||||
if test $use_additional = yes; then
|
|
||||||
dir="$additional_libdir"
|
|
||||||
dnl The same code as in the loop below:
|
|
||||||
dnl First look for a shared library.
|
|
||||||
if test -n "$acl_shlibext"; then
|
|
||||||
if test -f "$dir/$libname$shrext"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_so="$dir/$libname$shrext"
|
|
||||||
else
|
|
||||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
|
||||||
ver=`(cd "$dir" && \
|
|
||||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
|
||||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
|
||||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
|
||||||
| sed 1q ) 2>/dev/null`
|
|
||||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_so="$dir/$libname$shrext.$ver"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
eval library_names=\"$acl_library_names_spec\"
|
|
||||||
for f in $library_names; do
|
|
||||||
if test -f "$dir/$f"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_so="$dir/$f"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
dnl Then look for a static library.
|
|
||||||
if test "X$found_dir" = "X"; then
|
|
||||||
if test -f "$dir/$libname.$acl_libext"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_a="$dir/$libname.$acl_libext"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "X$found_dir" != "X"; then
|
|
||||||
if test -f "$dir/$libname.la"; then
|
|
||||||
found_la="$dir/$libname.la"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "X$found_dir" = "X"; then
|
|
||||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
case "$x" in
|
|
||||||
-L*)
|
|
||||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
|
||||||
dnl First look for a shared library.
|
|
||||||
if test -n "$acl_shlibext"; then
|
|
||||||
if test -f "$dir/$libname$shrext"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_so="$dir/$libname$shrext"
|
|
||||||
else
|
|
||||||
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
|
||||||
ver=`(cd "$dir" && \
|
|
||||||
for f in "$libname$shrext".*; do echo "$f"; done \
|
|
||||||
| sed -e "s,^$libname$shrext\\\\.,," \
|
|
||||||
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
|
||||||
| sed 1q ) 2>/dev/null`
|
|
||||||
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_so="$dir/$libname$shrext.$ver"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
eval library_names=\"$acl_library_names_spec\"
|
|
||||||
for f in $library_names; do
|
|
||||||
if test -f "$dir/$f"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_so="$dir/$f"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
dnl Then look for a static library.
|
|
||||||
if test "X$found_dir" = "X"; then
|
|
||||||
if test -f "$dir/$libname.$acl_libext"; then
|
|
||||||
found_dir="$dir"
|
|
||||||
found_a="$dir/$libname.$acl_libext"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "X$found_dir" != "X"; then
|
|
||||||
if test -f "$dir/$libname.la"; then
|
|
||||||
found_la="$dir/$libname.la"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if test "X$found_dir" != "X"; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if test "X$found_dir" != "X"; then
|
|
||||||
dnl Found the library.
|
|
||||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
|
||||||
if test "X$found_so" != "X"; then
|
|
||||||
dnl Linking with a shared library. We attempt to hardcode its
|
|
||||||
dnl directory into the executable's runpath, unless it's the
|
|
||||||
dnl standard /usr/lib.
|
|
||||||
if test "$enable_rpath" = no \
|
|
||||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|
|
||||||
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
|
|
||||||
dnl No hardcoding is needed.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
||||||
else
|
|
||||||
dnl Use an explicit option to hardcode DIR into the resulting
|
|
||||||
dnl binary.
|
|
||||||
dnl Potentially add DIR to ltrpathdirs.
|
|
||||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
|
||||||
haveit=
|
|
||||||
for x in $ltrpathdirs; do
|
|
||||||
if test "X$x" = "X$found_dir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
|
||||||
fi
|
|
||||||
dnl The hardcoding into $LIBNAME is system dependent.
|
|
||||||
if test "$acl_hardcode_direct" = yes; then
|
|
||||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
|
||||||
dnl resulting binary.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
||||||
else
|
|
||||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
|
||||||
dnl Use an explicit option to hardcode DIR into the resulting
|
|
||||||
dnl binary.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
||||||
dnl Potentially add DIR to rpathdirs.
|
|
||||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
|
||||||
haveit=
|
|
||||||
for x in $rpathdirs; do
|
|
||||||
if test "X$x" = "X$found_dir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
rpathdirs="$rpathdirs $found_dir"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
dnl Rely on "-L$found_dir".
|
|
||||||
dnl But don't add it if it's already contained in the LDFLAGS
|
|
||||||
dnl or the already constructed $LIBNAME
|
|
||||||
haveit=
|
|
||||||
for x in $LDFLAGS $LIB[]NAME; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
if test "X$x" = "X-L$found_dir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
|
||||||
fi
|
|
||||||
if test "$acl_hardcode_minus_L" != no; then
|
|
||||||
dnl FIXME: Not sure whether we should use
|
|
||||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
|
||||||
dnl here.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
|
||||||
else
|
|
||||||
dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
|
|
||||||
dnl here, because this doesn't fit in flags passed to the
|
|
||||||
dnl compiler. So give up. No hardcoding. This affects only
|
|
||||||
dnl very old systems.
|
|
||||||
dnl FIXME: Not sure whether we should use
|
|
||||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
|
||||||
dnl here.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if test "X$found_a" != "X"; then
|
|
||||||
dnl Linking with a static library.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
|
||||||
else
|
|
||||||
dnl We shouldn't come here, but anyway it's good to have a
|
|
||||||
dnl fallback.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
dnl Assume the include files are nearby.
|
|
||||||
additional_includedir=
|
|
||||||
case "$found_dir" in
|
|
||||||
*/$acl_libdirstem | */$acl_libdirstem/)
|
|
||||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
|
|
||||||
if test "$name" = '$1'; then
|
|
||||||
LIB[]NAME[]_PREFIX="$basedir"
|
|
||||||
fi
|
|
||||||
additional_includedir="$basedir/include"
|
|
||||||
;;
|
|
||||||
*/$acl_libdirstem2 | */$acl_libdirstem2/)
|
|
||||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
|
|
||||||
if test "$name" = '$1'; then
|
|
||||||
LIB[]NAME[]_PREFIX="$basedir"
|
|
||||||
fi
|
|
||||||
additional_includedir="$basedir/include"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
if test "X$additional_includedir" != "X"; then
|
|
||||||
dnl Potentially add $additional_includedir to $INCNAME.
|
|
||||||
dnl But don't add it
|
|
||||||
dnl 1. if it's the standard /usr/include,
|
|
||||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
|
||||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
|
||||||
dnl constructed $INCNAME,
|
|
||||||
dnl 4. if it doesn't exist as a directory.
|
|
||||||
if test "X$additional_includedir" != "X/usr/include"; then
|
|
||||||
haveit=
|
|
||||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
|
||||||
if test -n "$GCC"; then
|
|
||||||
case $host_os in
|
|
||||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
for x in $CPPFLAGS $INC[]NAME; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
if test "X$x" = "X-I$additional_includedir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
if test -d "$additional_includedir"; then
|
|
||||||
dnl Really add $additional_includedir to $INCNAME.
|
|
||||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
dnl Look for dependencies.
|
|
||||||
if test -n "$found_la"; then
|
|
||||||
dnl Read the .la file. It defines the variables
|
|
||||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
|
||||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
|
||||||
save_libdir="$libdir"
|
|
||||||
case "$found_la" in
|
|
||||||
*/* | *\\*) . "$found_la" ;;
|
|
||||||
*) . "./$found_la" ;;
|
|
||||||
esac
|
|
||||||
libdir="$save_libdir"
|
|
||||||
dnl We use only dependency_libs.
|
|
||||||
for dep in $dependency_libs; do
|
|
||||||
case "$dep" in
|
|
||||||
-L*)
|
|
||||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
|
||||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
|
||||||
dnl But don't add it
|
|
||||||
dnl 1. if it's the standard /usr/lib,
|
|
||||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
|
||||||
dnl 3. if it's already present in $LDFLAGS or the already
|
|
||||||
dnl constructed $LIBNAME,
|
|
||||||
dnl 4. if it doesn't exist as a directory.
|
|
||||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
|
|
||||||
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
|
|
||||||
haveit=
|
|
||||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|
|
||||||
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
|
|
||||||
if test -n "$GCC"; then
|
|
||||||
case $host_os in
|
|
||||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
haveit=
|
|
||||||
for x in $LDFLAGS $LIB[]NAME; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
if test "X$x" = "X-L$additional_libdir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
if test -d "$additional_libdir"; then
|
|
||||||
dnl Really add $additional_libdir to $LIBNAME.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
haveit=
|
|
||||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
if test "X$x" = "X-L$additional_libdir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
if test -d "$additional_libdir"; then
|
|
||||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
|
||||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
-R*)
|
|
||||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
|
||||||
if test "$enable_rpath" != no; then
|
|
||||||
dnl Potentially add DIR to rpathdirs.
|
|
||||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
|
||||||
haveit=
|
|
||||||
for x in $rpathdirs; do
|
|
||||||
if test "X$x" = "X$dir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
rpathdirs="$rpathdirs $dir"
|
|
||||||
fi
|
|
||||||
dnl Potentially add DIR to ltrpathdirs.
|
|
||||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
|
||||||
haveit=
|
|
||||||
for x in $ltrpathdirs; do
|
|
||||||
if test "X$x" = "X$dir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
ltrpathdirs="$ltrpathdirs $dir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
-l*)
|
|
||||||
dnl Handle this in the next round.
|
|
||||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
|
||||||
;;
|
|
||||||
*.la)
|
|
||||||
dnl Handle this in the next round. Throw away the .la's
|
|
||||||
dnl directory; it is already contained in a preceding -L
|
|
||||||
dnl option.
|
|
||||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
dnl Most likely an immediate library name.
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
|
||||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
dnl Didn't find the library; assume it is in the system directories
|
|
||||||
dnl known to the linker and runtime loader. (All the system
|
|
||||||
dnl directories known to the linker should also be known to the
|
|
||||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
|
||||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
if test "X$rpathdirs" != "X"; then
|
|
||||||
if test -n "$acl_hardcode_libdir_separator"; then
|
|
||||||
dnl Weird platform: only the last -rpath option counts, the user must
|
|
||||||
dnl pass all path elements in one option. We can arrange that for a
|
|
||||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
|
||||||
alldirs=
|
|
||||||
for found_dir in $rpathdirs; do
|
|
||||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
|
|
||||||
done
|
|
||||||
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
|
|
||||||
acl_save_libdir="$libdir"
|
|
||||||
libdir="$alldirs"
|
|
||||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
|
||||||
libdir="$acl_save_libdir"
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
|
||||||
else
|
|
||||||
dnl The -rpath options are cumulative.
|
|
||||||
for found_dir in $rpathdirs; do
|
|
||||||
acl_save_libdir="$libdir"
|
|
||||||
libdir="$found_dir"
|
|
||||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
|
||||||
libdir="$acl_save_libdir"
|
|
||||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "X$ltrpathdirs" != "X"; then
|
|
||||||
dnl When using libtool, the option that works for both libraries and
|
|
||||||
dnl executables is -R. The -R options are cumulative.
|
|
||||||
for found_dir in $ltrpathdirs; do
|
|
||||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
popdef([P_A_C_K])
|
|
||||||
popdef([PACKLIBS])
|
|
||||||
popdef([PACKUP])
|
|
||||||
popdef([PACK])
|
|
||||||
popdef([NAME])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
|
||||||
dnl unless already present in VAR.
|
|
||||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
|
||||||
dnl contains two or three consecutive elements that belong together.
|
|
||||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
|
||||||
[
|
|
||||||
for element in [$2]; do
|
|
||||||
haveit=
|
|
||||||
for x in $[$1]; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
if test "X$x" = "X$element"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
[$1]="${[$1]}${[$1]:+ }$element"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl For those cases where a variable contains several -L and -l options
|
|
||||||
dnl referring to unknown libraries and directories, this macro determines the
|
|
||||||
dnl necessary additional linker options for the runtime path.
|
|
||||||
dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
|
|
||||||
dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
|
|
||||||
dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
|
|
||||||
dnl otherwise linking without libtool is assumed.
|
|
||||||
AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
|
|
||||||
[
|
|
||||||
AC_REQUIRE([AC_LIB_RPATH])
|
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
|
||||||
$1=
|
|
||||||
if test "$enable_rpath" != no; then
|
|
||||||
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
|
||||||
dnl Use an explicit option to hardcode directories into the resulting
|
|
||||||
dnl binary.
|
|
||||||
rpathdirs=
|
|
||||||
next=
|
|
||||||
for opt in $2; do
|
|
||||||
if test -n "$next"; then
|
|
||||||
dir="$next"
|
|
||||||
dnl No need to hardcode the standard /usr/lib.
|
|
||||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
|
||||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
|
||||||
rpathdirs="$rpathdirs $dir"
|
|
||||||
fi
|
|
||||||
next=
|
|
||||||
else
|
|
||||||
case $opt in
|
|
||||||
-L) next=yes ;;
|
|
||||||
-L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
|
|
||||||
dnl No need to hardcode the standard /usr/lib.
|
|
||||||
if test "X$dir" != "X/usr/$acl_libdirstem" \
|
|
||||||
&& test "X$dir" != "X/usr/$acl_libdirstem2"; then
|
|
||||||
rpathdirs="$rpathdirs $dir"
|
|
||||||
fi
|
|
||||||
next= ;;
|
|
||||||
*) next= ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test "X$rpathdirs" != "X"; then
|
|
||||||
if test -n ""$3""; then
|
|
||||||
dnl libtool is used for linking. Use -R options.
|
|
||||||
for dir in $rpathdirs; do
|
|
||||||
$1="${$1}${$1:+ }-R$dir"
|
|
||||||
done
|
|
||||||
else
|
|
||||||
dnl The linker is used for linking directly.
|
|
||||||
if test -n "$acl_hardcode_libdir_separator"; then
|
|
||||||
dnl Weird platform: only the last -rpath option counts, the user
|
|
||||||
dnl must pass all path elements in one option.
|
|
||||||
alldirs=
|
|
||||||
for dir in $rpathdirs; do
|
|
||||||
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
|
|
||||||
done
|
|
||||||
acl_save_libdir="$libdir"
|
|
||||||
libdir="$alldirs"
|
|
||||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
|
||||||
libdir="$acl_save_libdir"
|
|
||||||
$1="$flag"
|
|
||||||
else
|
|
||||||
dnl The -rpath options are cumulative.
|
|
||||||
for dir in $rpathdirs; do
|
|
||||||
acl_save_libdir="$libdir"
|
|
||||||
libdir="$dir"
|
|
||||||
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
|
||||||
libdir="$acl_save_libdir"
|
|
||||||
$1="${$1}${$1:+ }$flag"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AC_SUBST([$1])
|
|
||||||
])
|
|
|
@ -1,224 +0,0 @@
|
||||||
# lib-prefix.m4 serial 7 (gettext-0.18)
|
|
||||||
dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc.
|
|
||||||
dnl This file is free software; the Free Software Foundation
|
|
||||||
dnl gives unlimited permission to copy and/or distribute it,
|
|
||||||
dnl with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
dnl From Bruno Haible.
|
|
||||||
|
|
||||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
|
||||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
|
||||||
dnl require excessive bracketing.
|
|
||||||
ifdef([AC_HELP_STRING],
|
|
||||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
|
||||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
|
||||||
|
|
||||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
|
||||||
dnl to access previously installed libraries. The basic assumption is that
|
|
||||||
dnl a user will want packages to use other packages he previously installed
|
|
||||||
dnl with the same --prefix option.
|
|
||||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
|
||||||
dnl libraries, but is otherwise very convenient.
|
|
||||||
AC_DEFUN([AC_LIB_PREFIX],
|
|
||||||
[
|
|
||||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
|
||||||
AC_REQUIRE([AC_PROG_CC])
|
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
|
|
||||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
|
||||||
dnl By default, look in $includedir and $libdir.
|
|
||||||
use_additional=yes
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([
|
|
||||||
eval additional_includedir=\"$includedir\"
|
|
||||||
eval additional_libdir=\"$libdir\"
|
|
||||||
])
|
|
||||||
AC_LIB_ARG_WITH([lib-prefix],
|
|
||||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
|
||||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
|
||||||
[
|
|
||||||
if test "X$withval" = "Xno"; then
|
|
||||||
use_additional=no
|
|
||||||
else
|
|
||||||
if test "X$withval" = "X"; then
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([
|
|
||||||
eval additional_includedir=\"$includedir\"
|
|
||||||
eval additional_libdir=\"$libdir\"
|
|
||||||
])
|
|
||||||
else
|
|
||||||
additional_includedir="$withval/include"
|
|
||||||
additional_libdir="$withval/$acl_libdirstem"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
if test $use_additional = yes; then
|
|
||||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
|
||||||
dnl But don't add it
|
|
||||||
dnl 1. if it's the standard /usr/include,
|
|
||||||
dnl 2. if it's already present in $CPPFLAGS,
|
|
||||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
|
||||||
dnl 4. if it doesn't exist as a directory.
|
|
||||||
if test "X$additional_includedir" != "X/usr/include"; then
|
|
||||||
haveit=
|
|
||||||
for x in $CPPFLAGS; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
if test "X$x" = "X-I$additional_includedir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
|
||||||
if test -n "$GCC"; then
|
|
||||||
case $host_os in
|
|
||||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
if test -d "$additional_includedir"; then
|
|
||||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
|
||||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
|
||||||
dnl But don't add it
|
|
||||||
dnl 1. if it's the standard /usr/lib,
|
|
||||||
dnl 2. if it's already present in $LDFLAGS,
|
|
||||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
|
||||||
dnl 4. if it doesn't exist as a directory.
|
|
||||||
if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
|
|
||||||
haveit=
|
|
||||||
for x in $LDFLAGS; do
|
|
||||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
|
||||||
if test "X$x" = "X-L$additional_libdir"; then
|
|
||||||
haveit=yes
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
|
|
||||||
if test -n "$GCC"; then
|
|
||||||
case $host_os in
|
|
||||||
linux*) haveit=yes;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test -z "$haveit"; then
|
|
||||||
if test -d "$additional_libdir"; then
|
|
||||||
dnl Really add $additional_libdir to $LDFLAGS.
|
|
||||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
|
||||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
|
||||||
dnl $exec_prefix will expand at the end of the configure script.
|
|
||||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
|
||||||
[
|
|
||||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
|
||||||
dnl at the end of configure.
|
|
||||||
if test "X$prefix" = "XNONE"; then
|
|
||||||
acl_final_prefix="$ac_default_prefix"
|
|
||||||
else
|
|
||||||
acl_final_prefix="$prefix"
|
|
||||||
fi
|
|
||||||
if test "X$exec_prefix" = "XNONE"; then
|
|
||||||
acl_final_exec_prefix='${prefix}'
|
|
||||||
else
|
|
||||||
acl_final_exec_prefix="$exec_prefix"
|
|
||||||
fi
|
|
||||||
acl_save_prefix="$prefix"
|
|
||||||
prefix="$acl_final_prefix"
|
|
||||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
|
||||||
prefix="$acl_save_prefix"
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
|
||||||
dnl variables prefix and exec_prefix bound to the values they will have
|
|
||||||
dnl at the end of the configure script.
|
|
||||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
|
||||||
[
|
|
||||||
acl_save_prefix="$prefix"
|
|
||||||
prefix="$acl_final_prefix"
|
|
||||||
acl_save_exec_prefix="$exec_prefix"
|
|
||||||
exec_prefix="$acl_final_exec_prefix"
|
|
||||||
$1
|
|
||||||
exec_prefix="$acl_save_exec_prefix"
|
|
||||||
prefix="$acl_save_prefix"
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl AC_LIB_PREPARE_MULTILIB creates
|
|
||||||
dnl - a variable acl_libdirstem, containing the basename of the libdir, either
|
|
||||||
dnl "lib" or "lib64" or "lib/64",
|
|
||||||
dnl - a variable acl_libdirstem2, as a secondary possible value for
|
|
||||||
dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
|
|
||||||
dnl "lib/amd64".
|
|
||||||
AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
|
|
||||||
[
|
|
||||||
dnl There is no formal standard regarding lib and lib64.
|
|
||||||
dnl On glibc systems, the current practice is that on a system supporting
|
|
||||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
|
||||||
dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
|
|
||||||
dnl the compiler's default mode by looking at the compiler's library search
|
|
||||||
dnl path. If at least one of its elements ends in /lib64 or points to a
|
|
||||||
dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
|
|
||||||
dnl Otherwise we use the default, namely "lib".
|
|
||||||
dnl On Solaris systems, the current practice is that on a system supporting
|
|
||||||
dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
|
|
||||||
dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
|
|
||||||
dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
|
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
||||||
acl_libdirstem=lib
|
|
||||||
acl_libdirstem2=
|
|
||||||
case "$host_os" in
|
|
||||||
solaris*)
|
|
||||||
dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
|
|
||||||
dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
|
|
||||||
dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
|
|
||||||
dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
|
|
||||||
dnl symlink is missing, so we set acl_libdirstem2 too.
|
|
||||||
AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
|
|
||||||
[AC_EGREP_CPP([sixtyfour bits], [
|
|
||||||
#ifdef _LP64
|
|
||||||
sixtyfour bits
|
|
||||||
#endif
|
|
||||||
], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
|
|
||||||
])
|
|
||||||
if test $gl_cv_solaris_64bit = yes; then
|
|
||||||
acl_libdirstem=lib/64
|
|
||||||
case "$host_cpu" in
|
|
||||||
sparc*) acl_libdirstem2=lib/sparcv9 ;;
|
|
||||||
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
|
|
||||||
if test -n "$searchpath"; then
|
|
||||||
acl_save_IFS="${IFS= }"; IFS=":"
|
|
||||||
for searchdir in $searchpath; do
|
|
||||||
if test -d "$searchdir"; then
|
|
||||||
case "$searchdir" in
|
|
||||||
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
|
|
||||||
*/../ | */.. )
|
|
||||||
# Better ignore directories of this form. They are misleading.
|
|
||||||
;;
|
|
||||||
*) searchdir=`cd "$searchdir" && pwd`
|
|
||||||
case "$searchdir" in
|
|
||||||
*/lib64 ) acl_libdirstem=lib64 ;;
|
|
||||||
esac ;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
IFS="$acl_save_IFS"
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
|
|
||||||
])
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,115 +0,0 @@
|
||||||
# ============================================================================
|
|
||||||
# https://www.gnu.org/software/autoconf-archive/ax_compile_check_sizeof.html
|
|
||||||
# ============================================================================
|
|
||||||
#
|
|
||||||
# SYNOPSIS
|
|
||||||
#
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(TYPE [, HEADERS [, EXTRA_SIZES...]])
|
|
||||||
#
|
|
||||||
# DESCRIPTION
|
|
||||||
#
|
|
||||||
# This macro checks for the size of TYPE using compile checks, not run
|
|
||||||
# checks. You can supply extra HEADERS to look into. the check will cycle
|
|
||||||
# through 1 2 4 8 16 and any EXTRA_SIZES the user supplies. If a match is
|
|
||||||
# found, it will #define SIZEOF_`TYPE' to that value. Otherwise it will
|
|
||||||
# emit a configure time error indicating the size of the type could not be
|
|
||||||
# determined.
|
|
||||||
#
|
|
||||||
# The trick is that C will not allow duplicate case labels. While this is
|
|
||||||
# valid C code:
|
|
||||||
#
|
|
||||||
# switch (0) case 0: case 1:;
|
|
||||||
#
|
|
||||||
# The following is not:
|
|
||||||
#
|
|
||||||
# switch (0) case 0: case 0:;
|
|
||||||
#
|
|
||||||
# Thus, the AC_COMPILE_IFELSE will fail if the currently tried size does
|
|
||||||
# not match.
|
|
||||||
#
|
|
||||||
# Here is an example skeleton configure.in script, demonstrating the
|
|
||||||
# macro's usage:
|
|
||||||
#
|
|
||||||
# AC_PROG_CC
|
|
||||||
# AC_CHECK_HEADERS(stddef.h unistd.h)
|
|
||||||
# AC_TYPE_SIZE_T
|
|
||||||
# AC_CHECK_TYPE(ssize_t, int)
|
|
||||||
#
|
|
||||||
# headers='#ifdef HAVE_STDDEF_H
|
|
||||||
# #include <stddef.h>
|
|
||||||
# #endif
|
|
||||||
# #ifdef HAVE_UNISTD_H
|
|
||||||
# #include <unistd.h>
|
|
||||||
# #endif
|
|
||||||
# '
|
|
||||||
#
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(char)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(short)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(int)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(long)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(unsigned char *)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(void *)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(size_t, $headers)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(ssize_t, $headers)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(ptrdiff_t, $headers)
|
|
||||||
# AX_COMPILE_CHECK_SIZEOF(off_t, $headers)
|
|
||||||
#
|
|
||||||
# LICENSE
|
|
||||||
#
|
|
||||||
# Copyright (c) 2008 Kaveh Ghazi <ghazi@caip.rutgers.edu>
|
|
||||||
# Copyright (c) 2017 Reini Urban <rurban@cpan.org>
|
|
||||||
#
|
|
||||||
# This program is free software: you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation, either version 3 of the License, or (at your
|
|
||||||
# option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful, but
|
|
||||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
||||||
# Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
#
|
|
||||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
|
||||||
# gives unlimited permission to copy, distribute and modify the configure
|
|
||||||
# scripts that are the output of Autoconf when processing the Macro. You
|
|
||||||
# need not follow the terms of the GNU General Public License when using
|
|
||||||
# or distributing such scripts, even though portions of the text of the
|
|
||||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
|
||||||
# all other use of the material that constitutes the Autoconf Macro.
|
|
||||||
#
|
|
||||||
# This special exception to the GPL applies to versions of the Autoconf
|
|
||||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
|
||||||
# modified version of the Autoconf Macro, you may extend this special
|
|
||||||
# exception to the GPL to apply to your modified version as well.
|
|
||||||
|
|
||||||
#serial 8
|
|
||||||
|
|
||||||
AU_ALIAS([AC_COMPILE_CHECK_SIZEOF], [AX_COMPILE_CHECK_SIZEOF])
|
|
||||||
AC_DEFUN([AX_COMPILE_CHECK_SIZEOF],
|
|
||||||
[changequote(<<, >>)dnl
|
|
||||||
dnl The name to #define.
|
|
||||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
|
||||||
dnl The cache variable name.
|
|
||||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
|
||||||
changequote([, ])dnl
|
|
||||||
AC_MSG_CHECKING(size of $1)
|
|
||||||
AC_CACHE_VAL(AC_CV_NAME,
|
|
||||||
[for ac_size in 4 8 1 2 16 $3 ; do # List sizes in rough order of prevalence.
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
|
||||||
#include <sys/types.h>
|
|
||||||
$2
|
|
||||||
]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])], [AC_CV_NAME=$ac_size])
|
|
||||||
if test x$AC_CV_NAME != x ; then break; fi
|
|
||||||
done
|
|
||||||
])
|
|
||||||
if test x$AC_CV_NAME = x ; then
|
|
||||||
AC_MSG_ERROR([cannot determine a size for $1])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($AC_CV_NAME)
|
|
||||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
|
||||||
undefine([AC_TYPE_NAME])dnl
|
|
||||||
undefine([AC_CV_NAME])dnl
|
|
||||||
])
|
|
|
@ -1,215 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# Common wrapper for a few potentially missing GNU programs.
|
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 1996-2021 Free Software Foundation, Inc.
|
|
||||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
|
|
||||||
--is-lightweight)
|
|
||||||
# Used by our autoconf macros to check whether the available missing
|
|
||||||
# script is modern enough.
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
|
|
||||||
--run)
|
|
||||||
# Back-compat with the calling convention used by older automake.
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-h|--h|--he|--hel|--help)
|
|
||||||
echo "\
|
|
||||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
|
||||||
|
|
||||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
|
||||||
to PROGRAM being missing or too old.
|
|
||||||
|
|
||||||
Options:
|
|
||||||
-h, --help display this help and exit
|
|
||||||
-v, --version output version information and exit
|
|
||||||
|
|
||||||
Supported PROGRAM values:
|
|
||||||
aclocal autoconf autoheader autom4te automake makeinfo
|
|
||||||
bison yacc flex lex help2man
|
|
||||||
|
|
||||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
|
||||||
'g' are ignored when checking the name.
|
|
||||||
|
|
||||||
Send bug reports to <bug-automake@gnu.org>."
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
|
||||||
echo "missing $scriptversion (GNU Automake)"
|
|
||||||
exit $?
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*)
|
|
||||||
echo 1>&2 "$0: unknown '$1' option"
|
|
||||||
echo 1>&2 "Try '$0 --help' for more information"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Run the given program, remember its exit status.
|
|
||||||
"$@"; st=$?
|
|
||||||
|
|
||||||
# If it succeeded, we are done.
|
|
||||||
test $st -eq 0 && exit 0
|
|
||||||
|
|
||||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
|
||||||
# passed; such an option is passed most likely to detect whether the
|
|
||||||
# program is present and works.
|
|
||||||
case $2 in --version|--help) exit $st;; esac
|
|
||||||
|
|
||||||
# Exit code 63 means version mismatch. This often happens when the user
|
|
||||||
# tries to use an ancient version of a tool on a file that requires a
|
|
||||||
# minimum version.
|
|
||||||
if test $st -eq 63; then
|
|
||||||
msg="probably too old"
|
|
||||||
elif test $st -eq 127; then
|
|
||||||
# Program was missing.
|
|
||||||
msg="missing on your system"
|
|
||||||
else
|
|
||||||
# Program was found and executed, but failed. Give up.
|
|
||||||
exit $st
|
|
||||||
fi
|
|
||||||
|
|
||||||
perl_URL=https://www.perl.org/
|
|
||||||
flex_URL=https://github.com/westes/flex
|
|
||||||
gnu_software_URL=https://www.gnu.org/software
|
|
||||||
|
|
||||||
program_details ()
|
|
||||||
{
|
|
||||||
case $1 in
|
|
||||||
aclocal|automake)
|
|
||||||
echo "The '$1' program is part of the GNU Automake package:"
|
|
||||||
echo "<$gnu_software_URL/automake>"
|
|
||||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
|
||||||
echo "<$gnu_software_URL/autoconf>"
|
|
||||||
echo "<$gnu_software_URL/m4/>"
|
|
||||||
echo "<$perl_URL>"
|
|
||||||
;;
|
|
||||||
autoconf|autom4te|autoheader)
|
|
||||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
|
||||||
echo "<$gnu_software_URL/autoconf/>"
|
|
||||||
echo "It also requires GNU m4 and Perl in order to run:"
|
|
||||||
echo "<$gnu_software_URL/m4/>"
|
|
||||||
echo "<$perl_URL>"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
give_advice ()
|
|
||||||
{
|
|
||||||
# Normalize program name to check for.
|
|
||||||
normalized_program=`echo "$1" | sed '
|
|
||||||
s/^gnu-//; t
|
|
||||||
s/^gnu//; t
|
|
||||||
s/^g//; t'`
|
|
||||||
|
|
||||||
printf '%s\n' "'$1' is $msg."
|
|
||||||
|
|
||||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
|
||||||
case $normalized_program in
|
|
||||||
autoconf*)
|
|
||||||
echo "You should only need it if you modified 'configure.ac',"
|
|
||||||
echo "or m4 files included by it."
|
|
||||||
program_details 'autoconf'
|
|
||||||
;;
|
|
||||||
autoheader*)
|
|
||||||
echo "You should only need it if you modified 'acconfig.h' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'autoheader'
|
|
||||||
;;
|
|
||||||
automake*)
|
|
||||||
echo "You should only need it if you modified 'Makefile.am' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'automake'
|
|
||||||
;;
|
|
||||||
aclocal*)
|
|
||||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
|
||||||
echo "$configure_deps."
|
|
||||||
program_details 'aclocal'
|
|
||||||
;;
|
|
||||||
autom4te*)
|
|
||||||
echo "You might have modified some maintainer files that require"
|
|
||||||
echo "the 'autom4te' program to be rebuilt."
|
|
||||||
program_details 'autom4te'
|
|
||||||
;;
|
|
||||||
bison*|yacc*)
|
|
||||||
echo "You should only need it if you modified a '.y' file."
|
|
||||||
echo "You may want to install the GNU Bison package:"
|
|
||||||
echo "<$gnu_software_URL/bison/>"
|
|
||||||
;;
|
|
||||||
lex*|flex*)
|
|
||||||
echo "You should only need it if you modified a '.l' file."
|
|
||||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
|
||||||
echo "<$flex_URL>"
|
|
||||||
;;
|
|
||||||
help2man*)
|
|
||||||
echo "You should only need it if you modified a dependency" \
|
|
||||||
"of a man page."
|
|
||||||
echo "You may want to install the GNU Help2man package:"
|
|
||||||
echo "<$gnu_software_URL/help2man/>"
|
|
||||||
;;
|
|
||||||
makeinfo*)
|
|
||||||
echo "You should only need it if you modified a '.texi' file, or"
|
|
||||||
echo "any other file indirectly affecting the aspect of the manual."
|
|
||||||
echo "You might want to install the Texinfo package:"
|
|
||||||
echo "<$gnu_software_URL/texinfo/>"
|
|
||||||
echo "The spurious makeinfo call might also be the consequence of"
|
|
||||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
|
||||||
echo "want to install GNU make:"
|
|
||||||
echo "<$gnu_software_URL/make/>"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "You might have modified some files without having the proper"
|
|
||||||
echo "tools for further handling them. Check the 'README' file, it"
|
|
||||||
echo "often tells you about the needed prerequisites for installing"
|
|
||||||
echo "this package. You may also peek at any GNU archive site, in"
|
|
||||||
echo "case some other package contains this missing '$1' program."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
|
||||||
-e '2,$s/^/ /' >&2
|
|
||||||
|
|
||||||
# Propagate the correct exit status (expected to be 127 for a program
|
|
||||||
# not found, 63 for a program that failed due to version mismatch).
|
|
||||||
exit $st
|
|
||||||
|
|
||||||
# Local variables:
|
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC0"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
|
@ -1,153 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# test-driver - basic testsuite driver script.
|
|
||||||
|
|
||||||
scriptversion=2018-03-07.03; # UTC
|
|
||||||
|
|
||||||
# Copyright (C) 2011-2021 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# As a special exception to the GNU General Public License, if you
|
|
||||||
# distribute this file as part of a program that contains a
|
|
||||||
# configuration script generated by Autoconf, you may include it under
|
|
||||||
# the same distribution terms that you use for the rest of that program.
|
|
||||||
|
|
||||||
# This file is maintained in Automake, please report
|
|
||||||
# bugs to <bug-automake@gnu.org> or send patches to
|
|
||||||
# <automake-patches@gnu.org>.
|
|
||||||
|
|
||||||
# Make unconditional expansion of undefined variables an error. This
|
|
||||||
# helps a lot in preventing typo-related bugs.
|
|
||||||
set -u
|
|
||||||
|
|
||||||
usage_error ()
|
|
||||||
{
|
|
||||||
echo "$0: $*" >&2
|
|
||||||
print_usage >&2
|
|
||||||
exit 2
|
|
||||||
}
|
|
||||||
|
|
||||||
print_usage ()
|
|
||||||
{
|
|
||||||
cat <<END
|
|
||||||
Usage:
|
|
||||||
test-driver --test-name NAME --log-file PATH --trs-file PATH
|
|
||||||
[--expect-failure {yes|no}] [--color-tests {yes|no}]
|
|
||||||
[--enable-hard-errors {yes|no}] [--]
|
|
||||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
|
||||||
|
|
||||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
|
||||||
See the GNU Automake documentation for information.
|
|
||||||
END
|
|
||||||
}
|
|
||||||
|
|
||||||
test_name= # Used for reporting.
|
|
||||||
log_file= # Where to save the output of the test script.
|
|
||||||
trs_file= # Where to save the metadata of the test run.
|
|
||||||
expect_failure=no
|
|
||||||
color_tests=no
|
|
||||||
enable_hard_errors=yes
|
|
||||||
while test $# -gt 0; do
|
|
||||||
case $1 in
|
|
||||||
--help) print_usage; exit $?;;
|
|
||||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
|
||||||
--test-name) test_name=$2; shift;;
|
|
||||||
--log-file) log_file=$2; shift;;
|
|
||||||
--trs-file) trs_file=$2; shift;;
|
|
||||||
--color-tests) color_tests=$2; shift;;
|
|
||||||
--expect-failure) expect_failure=$2; shift;;
|
|
||||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
|
||||||
--) shift; break;;
|
|
||||||
-*) usage_error "invalid option: '$1'";;
|
|
||||||
*) break;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
missing_opts=
|
|
||||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
|
||||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
|
||||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
|
||||||
if test x"$missing_opts" != x; then
|
|
||||||
usage_error "the following mandatory options are missing:$missing_opts"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
usage_error "missing argument"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $color_tests = yes; then
|
|
||||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
|
||||||
red='[0;31m' # Red.
|
|
||||||
grn='[0;32m' # Green.
|
|
||||||
lgn='[1;32m' # Light green.
|
|
||||||
blu='[1;34m' # Blue.
|
|
||||||
mgn='[0;35m' # Magenta.
|
|
||||||
std='[m' # No color.
|
|
||||||
else
|
|
||||||
red= grn= lgn= blu= mgn= std=
|
|
||||||
fi
|
|
||||||
|
|
||||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
|
||||||
trap "st=129; $do_exit" 1
|
|
||||||
trap "st=130; $do_exit" 2
|
|
||||||
trap "st=141; $do_exit" 13
|
|
||||||
trap "st=143; $do_exit" 15
|
|
||||||
|
|
||||||
# Test script is run here. We create the file first, then append to it,
|
|
||||||
# to ameliorate tests themselves also writing to the log file. Our tests
|
|
||||||
# don't, but others can (automake bug#35762).
|
|
||||||
: >"$log_file"
|
|
||||||
"$@" >>"$log_file" 2>&1
|
|
||||||
estatus=$?
|
|
||||||
|
|
||||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
|
||||||
tweaked_estatus=1
|
|
||||||
else
|
|
||||||
tweaked_estatus=$estatus
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $tweaked_estatus:$expect_failure in
|
|
||||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
|
||||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
|
||||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
|
||||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
|
||||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
|
||||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Report the test outcome and exit status in the logs, so that one can
|
|
||||||
# know whether the test passed or failed simply by looking at the '.log'
|
|
||||||
# file, without the need of also peaking into the corresponding '.trs'
|
|
||||||
# file (automake bug#11814).
|
|
||||||
echo "$res $test_name (exit status: $estatus)" >>"$log_file"
|
|
||||||
|
|
||||||
# Report outcome to console.
|
|
||||||
echo "${col}${res}${std}: $test_name"
|
|
||||||
|
|
||||||
# Register the test result, and other relevant metadata.
|
|
||||||
echo ":test-result: $res" > $trs_file
|
|
||||||
echo ":global-test-result: $res" >> $trs_file
|
|
||||||
echo ":recheck: $recheck" >> $trs_file
|
|
||||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: shell-script
|
|
||||||
# sh-indentation: 2
|
|
||||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
|
||||||
# time-stamp-start: "scriptversion="
|
|
||||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
|
||||||
# time-stamp-time-zone: "UTC0"
|
|
||||||
# time-stamp-end: "; # UTC"
|
|
||||||
# End:
|
|
|
@ -1,68 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PATH=/usr/local/gnu-autotools/bin/:$PATH
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
# Start from one level above the build directory
|
|
||||||
if [ -f version ]; then
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ \! -f build/version ]; then
|
|
||||||
echo "Can't find source directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# BSD make's "OBJDIR" support freaks out the automake-generated
|
|
||||||
# Makefile. Effectively disable it.
|
|
||||||
export MAKEOBJDIRPREFIX=/junk
|
|
||||||
|
|
||||||
# Start from the build directory, where the version file is located
|
|
||||||
if [ -f build/version ]; then
|
|
||||||
cd build
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ \! -f version ]; then
|
|
||||||
echo "Can't find version file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update the build number in the 'version' file.
|
|
||||||
# Separate number from additional alpha/beta/etc marker
|
|
||||||
MARKER=`cat version | sed 's/[0-9.]//g'`
|
|
||||||
# Bump the number
|
|
||||||
VN=`cat version | sed 's/[^0-9.]//g'`
|
|
||||||
# Build out the string.
|
|
||||||
VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
|
|
||||||
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
# Clean up the source dir as much as we can.
|
|
||||||
/bin/sh build/clean.sh
|
|
||||||
|
|
||||||
# Substitute the versions into Libarchive's archive.h and archive_entry.h
|
|
||||||
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_NUMBER).*/\$1 $VN/" libarchive/archive.h
|
|
||||||
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_NUMBER).*/\$1 $VN/" libarchive/archive_entry.h
|
|
||||||
perl -p -i -e "s/^(#define\tARCHIVE_VERSION_ONLY_STRING).*/\$1 \"$VS\"/" libarchive/archive.h
|
|
||||||
# Substitute versions into configure.ac as well
|
|
||||||
perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_S\]),.*\)/$1,['"$VS"'])/' configure.ac
|
|
||||||
perl -p -i -e 's/(m4_define\(\[LIBARCHIVE_VERSION_N\]),.*\)/$1,['"$VN"'])/' configure.ac
|
|
||||||
|
|
||||||
# Remove developer CFLAGS if a release build is being made
|
|
||||||
if [ -n "${MAKE_LIBARCHIVE_RELEASE}" ]; then
|
|
||||||
perl -p -i -e "s/^(DEV_CFLAGS.*)/# \$1/" Makefile.am
|
|
||||||
perl -p -i -e 's/CMAKE_BUILD_TYPE "[A-Za-z]*"/CMAKE_BUILD_TYPE "Release"/' CMakeLists.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
aclocal -I build/autoconf
|
|
||||||
|
|
||||||
# Note: --automake flag needed only for libtoolize from
|
|
||||||
# libtool 1.5.x; in libtool 2.2.x it is a synonym for --quiet
|
|
||||||
case `uname` in
|
|
||||||
Darwin) glibtoolize --automake -c;;
|
|
||||||
*) libtoolize --automake -c;;
|
|
||||||
esac
|
|
||||||
autoconf
|
|
||||||
autoheader
|
|
||||||
automake -a -c
|
|
|
@ -1,36 +0,0 @@
|
||||||
#!/bin/sh +v
|
|
||||||
|
|
||||||
# Start from the build directory, where the version file is located
|
|
||||||
if [ -f build/version ]; then
|
|
||||||
cd build
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ \! -f version ]; then
|
|
||||||
echo "Can't find version file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update the build number in the 'version' file.
|
|
||||||
# Separate number from additional alpha/beta/etc marker
|
|
||||||
MARKER=`cat version | sed 's/[0-9.]//g'`
|
|
||||||
# Bump the number
|
|
||||||
VN=`cat version | sed 's/[^0-9.]//g'`
|
|
||||||
# Reassemble and write back out
|
|
||||||
VN=$(($VN + 1))
|
|
||||||
rm -f version.old
|
|
||||||
mv version version.old
|
|
||||||
chmod +w version.old
|
|
||||||
echo $VN$MARKER > version
|
|
||||||
VS="$(($VN/1000000)).$(( ($VN/1000)%1000 )).$(( $VN%1000 ))$MARKER"
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
ANNOUNCE=`date +"%b %d, %Y:"`" libarchive $VS released"
|
|
||||||
|
|
||||||
echo $ANNOUNCE
|
|
||||||
|
|
||||||
# Add a version notice to NEWS
|
|
||||||
mv NEWS NEWS.bak
|
|
||||||
chmod +w NEWS.bak
|
|
||||||
echo $ANNOUNCE >> NEWS
|
|
||||||
echo >> NEWS
|
|
||||||
cat NEWS.bak >> NEWS
|
|
|
@ -1,99 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
#
|
|
||||||
# Attempt to remove as many generated files as we can.
|
|
||||||
# Ideally, a well-used development sandbox would look like
|
|
||||||
# a pristine checkout after running this script.
|
|
||||||
#
|
|
||||||
|
|
||||||
if [ \! -f build/version ]; then
|
|
||||||
echo 'Must run the clean script from the top-level dir of the libarchive distribution' 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If we're on BSD, blow away the build dir under /usr/obj
|
|
||||||
rm -rf /usr/obj`pwd`
|
|
||||||
|
|
||||||
#
|
|
||||||
# Try to clean up a bit more...
|
|
||||||
#
|
|
||||||
|
|
||||||
find . -name '*.So' | xargs rm -f
|
|
||||||
find . -name '*.a' | xargs rm -f
|
|
||||||
find . -name '*.la' | xargs rm -f
|
|
||||||
find . -name '*.lo' | xargs rm -f
|
|
||||||
find . -name '*.o' | xargs rm -f
|
|
||||||
find . -name '*.orig' | xargs rm -f
|
|
||||||
find . -name '*.po' | xargs rm -f
|
|
||||||
find . -name '*.rej' | xargs rm -f
|
|
||||||
find . -name '*~' | xargs rm -f
|
|
||||||
find . -name '.depend' | xargs rm -f
|
|
||||||
find . -name '.deps' | xargs rm -rf
|
|
||||||
find . -name '.dirstamp' | xargs rm -f
|
|
||||||
find . -name '.libs' | xargs rm -rf
|
|
||||||
find . -name 'CMakeFiles' | xargs rm -rf
|
|
||||||
find . -name 'cmake_install.cmake' | xargs rm -f
|
|
||||||
find . -name 'CTestTestfile.cmake' | xargs rm -f
|
|
||||||
|
|
||||||
rm -rf Testing
|
|
||||||
rm -rf autom4te.cache
|
|
||||||
rm -rf bin
|
|
||||||
rm -rf cmake.tmp
|
|
||||||
rm -rf libarchive/Testing
|
|
||||||
|
|
||||||
rm -f CMakeCache.txt
|
|
||||||
rm -f DartConfiguration.tcl
|
|
||||||
rm -f Makefile
|
|
||||||
rm -f Makefile.in
|
|
||||||
rm -f aclocal.m4
|
|
||||||
rm -f bsdcpio
|
|
||||||
rm -f bsdcpio_test
|
|
||||||
rm -f bsdtar
|
|
||||||
rm -f bsdtar_test
|
|
||||||
rm -f build/autoconf/compile
|
|
||||||
rm -f build/autoconf/config.guess
|
|
||||||
rm -f build/autoconf/config.sub
|
|
||||||
rm -f build/autoconf/depcomp
|
|
||||||
rm -f build/autoconf/install-sh
|
|
||||||
rm -f build/autoconf/libtool.m4
|
|
||||||
rm -f build/autoconf/ltmain.sh
|
|
||||||
rm -f build/autoconf/ltoptions.m4
|
|
||||||
rm -f build/autoconf/ltsugar.m4
|
|
||||||
rm -f build/autoconf/ltversion.m4
|
|
||||||
rm -f build/autoconf/lt~obsolete.m4
|
|
||||||
rm -f build/autoconf/missing
|
|
||||||
rm -f build/autoconf/test-driver
|
|
||||||
rm -f build/pkgconfig/libarchive.pc
|
|
||||||
rm -f build/version.old
|
|
||||||
rm -f cat/test/list.h
|
|
||||||
rm -f config.h
|
|
||||||
rm -f config.h.in
|
|
||||||
rm -f config.log
|
|
||||||
rm -f config.status
|
|
||||||
rm -f configure
|
|
||||||
rm -f cpio/*.1.gz
|
|
||||||
rm -f cpio/Makefile
|
|
||||||
rm -f cpio/bsdcpio
|
|
||||||
rm -f cpio/test/Makefile
|
|
||||||
rm -f cpio/test/bsdcpio_test
|
|
||||||
rm -f cpio/test/list.h
|
|
||||||
rm -f doc/html/*
|
|
||||||
rm -f doc/man/*
|
|
||||||
rm -f doc/pdf/*
|
|
||||||
rm -f doc/text/*
|
|
||||||
rm -f doc/wiki/*
|
|
||||||
rm -f libarchive/*.[35].gz
|
|
||||||
rm -f libarchive/Makefile
|
|
||||||
rm -f libarchive/libarchive.so*
|
|
||||||
rm -f libarchive/test/Makefile
|
|
||||||
rm -f libarchive/test/libarchive_test
|
|
||||||
rm -f libarchive/test/list.h
|
|
||||||
rm -f libarchive_test
|
|
||||||
rm -f libtool
|
|
||||||
rm -f stamp-h1
|
|
||||||
rm -f tar/*.1.gz
|
|
||||||
rm -f tar/Makefile
|
|
||||||
rm -f tar/bsdtar
|
|
||||||
rm -f tar/test/Makefile
|
|
||||||
rm -f tar/test/bsdtar_test
|
|
||||||
rm -f tar/test/list.h
|
|
|
@ -1,14 +0,0 @@
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
#define KB ((off_t)1024)
|
|
||||||
#define MB ((off_t)1024 * KB)
|
|
||||||
#define GB ((off_t)1024 * MB)
|
|
||||||
#define TB ((off_t)1024 * GB)
|
|
||||||
int t2[(((64 * GB -1) % 671088649) == 268434537)
|
|
||||||
&& (((TB - (64 * GB -1) + 255) % 1792151290) == 305159546)? 1: -1];
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
# - Check if _FILE_OFFSET_BITS macro needed for large files
|
|
||||||
# CHECK_FILE_OFFSET_BITS ()
|
|
||||||
#
|
|
||||||
# The following variables may be set before calling this macro to
|
|
||||||
# modify the way the check is run:
|
|
||||||
#
|
|
||||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
|
||||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
|
||||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
|
||||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
|
||||||
#
|
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
||||||
|
|
||||||
#INCLUDE(CheckCXXSourceCompiles)
|
|
||||||
|
|
||||||
GET_FILENAME_COMPONENT(_selfdir_CheckFileOffsetBits
|
|
||||||
"${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
|
|
||||||
MACRO (CHECK_FILE_OFFSET_BITS)
|
|
||||||
IF(NOT DEFINED _FILE_OFFSET_BITS)
|
|
||||||
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files")
|
|
||||||
TRY_COMPILE(__WITHOUT_FILE_OFFSET_BITS_64
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
|
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
|
|
||||||
IF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
|
|
||||||
TRY_COMPILE(__WITH_FILE_OFFSET_BITS_64
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${_selfdir_CheckFileOffsetBits}/CheckFileOffsetBits.c
|
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_FILE_OFFSET_BITS=64)
|
|
||||||
ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64)
|
|
||||||
|
|
||||||
IF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
|
|
||||||
SET(_FILE_OFFSET_BITS 64 CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
|
|
||||||
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - needed")
|
|
||||||
ELSE(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
|
|
||||||
SET(_FILE_OFFSET_BITS "" CACHE INTERNAL "_FILE_OFFSET_BITS macro needed for large files")
|
|
||||||
MESSAGE(STATUS "Checking _FILE_OFFSET_BITS for large files - not needed")
|
|
||||||
ENDIF(NOT __WITHOUT_FILE_OFFSET_BITS_64 AND __WITH_FILE_OFFSET_BITS_64)
|
|
||||||
ENDIF(NOT DEFINED _FILE_OFFSET_BITS)
|
|
||||||
|
|
||||||
ENDMACRO (CHECK_FILE_OFFSET_BITS)
|
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
# Check if the system has the specified function; treat glibc "stub"
|
|
||||||
# functions as nonexistent:
|
|
||||||
# CHECK_FUNCTION_EXISTS_GLIBC (FUNCTION FUNCVAR)
|
|
||||||
#
|
|
||||||
# FUNCTION - the function(s) where the prototype should be declared
|
|
||||||
# FUNCVAR - variable to define if the function does exist
|
|
||||||
#
|
|
||||||
# In particular, this understands the glibc convention of
|
|
||||||
# defining macros __stub_XXXX or __stub___XXXX if the function
|
|
||||||
# does appear in the library but is merely a stub that does nothing.
|
|
||||||
# By detecting this case, we can select alternate behavior on
|
|
||||||
# platforms that don't support this functionality.
|
|
||||||
#
|
|
||||||
# The following variables may be set before calling this macro to
|
|
||||||
# modify the way the check is run:
|
|
||||||
#
|
|
||||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
|
||||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
|
||||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
|
||||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
|
||||||
#
|
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
||||||
|
|
||||||
INCLUDE(CheckFunctionExists)
|
|
||||||
GET_FILENAME_COMPONENT(_selfdir_CheckFunctionExistsGlibc
|
|
||||||
"${CMAKE_CURRENT_LIST_FILE}" PATH)
|
|
||||||
|
|
||||||
MACRO (CHECK_FUNCTION_EXISTS_GLIBC _FUNC _FUNCVAR)
|
|
||||||
IF(NOT DEFINED ${_FUNCVAR})
|
|
||||||
SET(CHECK_STUB_FUNC_1 "__stub_${_FUNC}")
|
|
||||||
SET(CHECK_STUB_FUNC_2 "__stub___${_FUNC}")
|
|
||||||
CONFIGURE_FILE( ${_selfdir_CheckFunctionExistsGlibc}/CheckFuncs_stub.c.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c IMMEDIATE)
|
|
||||||
TRY_COMPILE(__stub
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/cmake.tmp/CheckFuncs_stub.c
|
|
||||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
|
||||||
CMAKE_FLAGS
|
|
||||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS}
|
|
||||||
"${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}")
|
|
||||||
IF (__stub)
|
|
||||||
SET("${_FUNCVAR}" "" CACHE INTERNAL "Have function ${_FUNC}")
|
|
||||||
ELSE (__stub)
|
|
||||||
CHECK_FUNCTION_EXISTS("${_FUNC}" "${_FUNCVAR}")
|
|
||||||
ENDIF (__stub)
|
|
||||||
ENDIF(NOT DEFINED ${_FUNCVAR})
|
|
||||||
ENDMACRO (CHECK_FUNCTION_EXISTS_GLIBC)
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
#ifdef __STDC__
|
|
||||||
#include <limits.h>
|
|
||||||
#else
|
|
||||||
#include <assert.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
|
||||||
main()
|
|
||||||
{
|
|
||||||
#if defined ${CHECK_STUB_FUNC_1} || defined ${CHECK_STUB_FUNC_2}
|
|
||||||
return 0;
|
|
||||||
#else
|
|
||||||
this system have stub
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
# - Check if the system has the specified type
|
|
||||||
# CHECK_HEADER_DIRENT (HEADER1 HEARDER2 ...)
|
|
||||||
#
|
|
||||||
# HEADER - the header(s) where the prototype should be declared
|
|
||||||
#
|
|
||||||
# The following variables may be set before calling this macro to
|
|
||||||
# modify the way the check is run:
|
|
||||||
#
|
|
||||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
|
||||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
|
||||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
|
||||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
|
||||||
#
|
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
||||||
|
|
||||||
|
|
||||||
INCLUDE(CheckTypeExists)
|
|
||||||
|
|
||||||
MACRO (CHECK_HEADER_DIRENT)
|
|
||||||
CHECK_TYPE_EXISTS("DIR *" dirent.h HAVE_DIRENT_H)
|
|
||||||
IF(NOT HAVE_DIRENT_H)
|
|
||||||
CHECK_TYPE_EXISTS("DIR *" sys/ndir.h HAVE_SYS_NDIR_H)
|
|
||||||
IF(NOT HAVE_SYS_NDIR_H)
|
|
||||||
CHECK_TYPE_EXISTS("DIR *" ndir.h HAVE_NDIR_H)
|
|
||||||
IF(NOT HAVE_NDIR_H)
|
|
||||||
CHECK_TYPE_EXISTS("DIR *" sys/dir.h HAVE_SYS_DIR_H)
|
|
||||||
ENDIF(NOT HAVE_NDIR_H)
|
|
||||||
ENDIF(NOT HAVE_SYS_NDIR_H)
|
|
||||||
ENDIF(NOT HAVE_DIRENT_H)
|
|
||||||
ENDMACRO (CHECK_HEADER_DIRENT)
|
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
# - Check if the system has the specified type
|
|
||||||
# CHECK_TYPE_EXISTS (TYPE HEADER VARIABLE)
|
|
||||||
#
|
|
||||||
# TYPE - the name of the type or struct or class you are interested in
|
|
||||||
# HEADER - the header(s) where the prototype should be declared
|
|
||||||
# VARIABLE - variable to store the result
|
|
||||||
#
|
|
||||||
# The following variables may be set before calling this macro to
|
|
||||||
# modify the way the check is run:
|
|
||||||
#
|
|
||||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
|
||||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
|
||||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
|
||||||
# Copyright (c) 2009, Michihiro NAKAJIMA
|
|
||||||
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
|
|
||||||
#
|
|
||||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
|
||||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
|
||||||
|
|
||||||
|
|
||||||
INCLUDE(CheckCSourceCompiles)
|
|
||||||
|
|
||||||
MACRO (CHECK_TYPE_EXISTS _TYPE _HEADER _RESULT)
|
|
||||||
SET(_INCLUDE_FILES)
|
|
||||||
FOREACH (it ${_HEADER})
|
|
||||||
SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n")
|
|
||||||
ENDFOREACH (it)
|
|
||||||
|
|
||||||
SET(_CHECK_TYPE_EXISTS_SOURCE_CODE "
|
|
||||||
${_INCLUDE_FILES}
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
static ${_TYPE} tmp;
|
|
||||||
if (sizeof(tmp))
|
|
||||||
return 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
")
|
|
||||||
CHECK_C_SOURCE_COMPILES("${_CHECK_TYPE_EXISTS_SOURCE_CODE}" ${_RESULT})
|
|
||||||
|
|
||||||
ENDMACRO (CHECK_TYPE_EXISTS)
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
# - Generate a libarchive.pc like autotools for pkg-config
|
|
||||||
#
|
|
||||||
|
|
||||||
# Set the required variables (we use the same input file as autotools)
|
|
||||||
SET(prefix ${CMAKE_INSTALL_PREFIX})
|
|
||||||
SET(exec_prefix \${prefix})
|
|
||||||
SET(libdir \${exec_prefix}/lib)
|
|
||||||
SET(includedir \${prefix}/include)
|
|
||||||
# Now, this is not particularly pretty, nor is it terribly accurate...
|
|
||||||
# Loop over all our additional libs
|
|
||||||
FOREACH(mylib ${ADDITIONAL_LIBS})
|
|
||||||
# Extract the filename from the absolute path
|
|
||||||
GET_FILENAME_COMPONENT(mylib_name ${mylib} NAME_WE)
|
|
||||||
# Strip the lib prefix
|
|
||||||
STRING(REGEX REPLACE "^lib" "" mylib_name ${mylib_name})
|
|
||||||
# Append it to our LIBS string
|
|
||||||
SET(LIBS "${LIBS} -l${mylib_name}")
|
|
||||||
ENDFOREACH()
|
|
||||||
# libxml2 is easier, since it's already using pkg-config
|
|
||||||
FOREACH(mylib ${PC_LIBXML_STATIC_LDFLAGS})
|
|
||||||
SET(LIBS "${LIBS} ${mylib}")
|
|
||||||
ENDFOREACH()
|
|
||||||
# FIXME: The order of the libraries doesn't take dependencies into account,
|
|
||||||
# thus there's a good chance it'll make some binutils versions unhappy...
|
|
||||||
# This only affects Libs.private (looked up for static builds) though.
|
|
||||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/pkgconfig/libarchive.pc.in
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/build/pkgconfig/libarchive.pc
|
|
||||||
@ONLY)
|
|
||||||
# And install it, of course ;).
|
|
||||||
IF(ENABLE_INSTALL)
|
|
||||||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/pkgconfig/libarchive.pc
|
|
||||||
DESTINATION "lib/pkgconfig")
|
|
||||||
ENDIF()
|
|
|
@ -1,22 +0,0 @@
|
||||||
# - Find libgcc
|
|
||||||
# Find the libgcc library.
|
|
||||||
#
|
|
||||||
# LIBGCC_LIBRARIES - List of libraries when using libgcc
|
|
||||||
# LIBGCC_FOUND - True if libgcc found.
|
|
||||||
|
|
||||||
IF (LIBGCC_LIBRARY)
|
|
||||||
# Already in cache, be silent
|
|
||||||
SET(LIBGCC_FIND_QUIETLY TRUE)
|
|
||||||
ENDIF (LIBGCC_LIBRARY)
|
|
||||||
|
|
||||||
FIND_LIBRARY(LIBGCC_LIBRARY NAMES gcc libgcc)
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set LIBGCC_FOUND to TRUE if
|
|
||||||
# all listed variables are TRUE
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBGCC DEFAULT_MSG LIBGCC_LIBRARY)
|
|
||||||
|
|
||||||
IF(LIBGCC_FOUND)
|
|
||||||
SET(LIBGCC_LIBRARIES ${LIBGCC_LIBRARY})
|
|
||||||
SET(HAVE_LIBGCC 1)
|
|
||||||
ENDIF(LIBGCC_FOUND)
|
|
|
@ -1,13 +0,0 @@
|
||||||
find_path(MBEDTLS_INCLUDE_DIRS mbedtls/ssl.h)
|
|
||||||
|
|
||||||
find_library(MBEDTLS_LIBRARY mbedtls)
|
|
||||||
find_library(MBEDX509_LIBRARY mbedx509)
|
|
||||||
find_library(MBEDCRYPTO_LIBRARY mbedcrypto)
|
|
||||||
|
|
||||||
set(MBEDTLS_LIBRARIES "${MBEDTLS_LIBRARY}" "${MBEDX509_LIBRARY}" "${MBEDCRYPTO_LIBRARY}")
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(MBEDTLS DEFAULT_MSG
|
|
||||||
MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
|
||||||
|
|
||||||
mark_as_advanced(MBEDTLS_INCLUDE_DIRS MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
|
|
|
@ -1,23 +0,0 @@
|
||||||
# - Find Nettle
|
|
||||||
# Find the Nettle include directory and library
|
|
||||||
#
|
|
||||||
# NETTLE_INCLUDE_DIR - where to find <nettle/sha.h>, etc.
|
|
||||||
# NETTLE_LIBRARIES - List of libraries when using libnettle.
|
|
||||||
# NETTLE_FOUND - True if libnettle found.
|
|
||||||
|
|
||||||
IF (NETTLE_INCLUDE_DIR)
|
|
||||||
# Already in cache, be silent
|
|
||||||
SET(NETTLE_FIND_QUIETLY TRUE)
|
|
||||||
ENDIF (NETTLE_INCLUDE_DIR)
|
|
||||||
|
|
||||||
FIND_PATH(NETTLE_INCLUDE_DIR nettle/md5.h nettle/ripemd160.h nettle/sha.h)
|
|
||||||
FIND_LIBRARY(NETTLE_LIBRARY NAMES nettle libnettle)
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set NETTLE_FOUND to TRUE if
|
|
||||||
# all listed variables are TRUE
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETTLE DEFAULT_MSG NETTLE_LIBRARY NETTLE_INCLUDE_DIR)
|
|
||||||
|
|
||||||
IF(NETTLE_FOUND)
|
|
||||||
SET(NETTLE_LIBRARIES ${NETTLE_LIBRARY})
|
|
||||||
ENDIF(NETTLE_FOUND)
|
|
|
@ -1,34 +0,0 @@
|
||||||
# - Find pcreposix
|
|
||||||
# Find the native PCRE and PCREPOSIX include and libraries
|
|
||||||
#
|
|
||||||
# PCRE_INCLUDE_DIR - where to find pcreposix.h, etc.
|
|
||||||
# PCREPOSIX_LIBRARIES - List of libraries when using libpcreposix.
|
|
||||||
# PCRE_LIBRARIES - List of libraries when using libpcre.
|
|
||||||
# PCREPOSIX_FOUND - True if libpcreposix found.
|
|
||||||
# PCRE_FOUND - True if libpcre found.
|
|
||||||
|
|
||||||
IF (PCRE_INCLUDE_DIR)
|
|
||||||
# Already in cache, be silent
|
|
||||||
SET(PCRE_FIND_QUIETLY TRUE)
|
|
||||||
ENDIF (PCRE_INCLUDE_DIR)
|
|
||||||
|
|
||||||
FIND_PATH(PCRE_INCLUDE_DIR pcreposix.h)
|
|
||||||
FIND_LIBRARY(PCREPOSIX_LIBRARY NAMES pcreposix libpcreposix)
|
|
||||||
FIND_LIBRARY(PCRE_LIBRARY NAMES pcre libpcre)
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set PCREPOSIX_FOUND to TRUE if
|
|
||||||
# all listed variables are TRUE
|
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCREPOSIX DEFAULT_MSG PCREPOSIX_LIBRARY PCRE_INCLUDE_DIR)
|
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG PCRE_LIBRARY)
|
|
||||||
|
|
||||||
IF(PCREPOSIX_FOUND)
|
|
||||||
SET(PCREPOSIX_LIBRARIES ${PCREPOSIX_LIBRARY})
|
|
||||||
SET(HAVE_LIBPCREPOSIX 1)
|
|
||||||
SET(HAVE_PCREPOSIX_H 1)
|
|
||||||
ENDIF(PCREPOSIX_FOUND)
|
|
||||||
|
|
||||||
IF(PCRE_FOUND)
|
|
||||||
SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
|
|
||||||
SET(HAVE_LIBPCRE 1)
|
|
||||||
ENDIF(PCRE_FOUND)
|
|
|
@ -1,68 +0,0 @@
|
||||||
#################################################################
|
|
||||||
# Adds a build target called "coverage" for code coverage.
|
|
||||||
#
|
|
||||||
# This compiles the code using special GCC flags, run the tests,
|
|
||||||
# and then generates a nice HTML output. This new "coverage" make
|
|
||||||
# target will only be available if you build using GCC in Debug
|
|
||||||
# mode. If any of the required programs (lcov and genhtml) were
|
|
||||||
# not found, a FATAL_ERROR message is printed.
|
|
||||||
#
|
|
||||||
# If not already done, this code will set ENABLE_TEST to ON.
|
|
||||||
#
|
|
||||||
# To build the code coverage and open it in your browser do this:
|
|
||||||
#
|
|
||||||
# mkdir debug
|
|
||||||
# cd debug
|
|
||||||
# cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON ..
|
|
||||||
# make -j4
|
|
||||||
# make coverage
|
|
||||||
# xdg-open coverage/index.html
|
|
||||||
#################################################################
|
|
||||||
|
|
||||||
# Find programs we need
|
|
||||||
FIND_PROGRAM(LCOV_EXECUTABLE lcov DOC "Full path to lcov executable")
|
|
||||||
FIND_PROGRAM(GENHTML_EXECUTABLE genhtml DOC "Full path to genhtml executable")
|
|
||||||
MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE)
|
|
||||||
|
|
||||||
# Check, compiler, build types and programs are available
|
|
||||||
IF(NOT CMAKE_COMPILER_IS_GNUCC)
|
|
||||||
MESSAGE(FATAL_ERROR "Coverage can only be built on GCC")
|
|
||||||
ELSEIF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
MESSAGE(FATAL_ERROR "Coverage can only be built in Debug mode")
|
|
||||||
ELSEIF(NOT LCOV_EXECUTABLE)
|
|
||||||
MESSAGE(FATAL_ERROR "lcov executable not found")
|
|
||||||
ELSEIF(NOT GENHTML_EXECUTABLE)
|
|
||||||
MESSAGE(FATAL_ERROR "genhtml executable not found")
|
|
||||||
ENDIF(NOT CMAKE_COMPILER_IS_GNUCC)
|
|
||||||
|
|
||||||
# Enable testing if not already done
|
|
||||||
SET(ENABLE_TEST ON)
|
|
||||||
|
|
||||||
#################################################################
|
|
||||||
# Set special compiler and linker flags for test coverage
|
|
||||||
#################################################################
|
|
||||||
# 0. Enable debug: -g
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")
|
|
||||||
# 1. Disable optimizations: -O0
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0")
|
|
||||||
# 2. Enable all kind of warnings:
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -W")
|
|
||||||
# 3. Enable special coverage flag (HINT: --coverage is a synonym for -fprofile-arcs -ftest-coverage)
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
|
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
|
|
||||||
#################################################################
|
|
||||||
|
|
||||||
ADD_CUSTOM_TARGET(coverage
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "Beginning test coverage. Output is written to coverage.log."
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-1/5: Reset all execution counts to zero"
|
|
||||||
COMMAND ${LCOV_EXECUTABLE} --directory . --zerocounters > coverage.log 2>&1
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-2/5: Run testrunner"
|
|
||||||
COMMAND ${CMAKE_CTEST_COMMAND} >> coverage.log 2>&1
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-3/5: Collect coverage data"
|
|
||||||
COMMAND ${LCOV_EXECUTABLE} --capture --directory . --output-file "./coverage.info" >> coverage.log 2>&1
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-4/5: Generate HTML from coverage data"
|
|
||||||
COMMAND ${GENHTML_EXECUTABLE} "coverage.info" --title="libarchive-${LIBARCHIVE_VERSION_STRING}" --show-details --legend --output-directory "./coverage" >> coverage.log 2>&1
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E echo "COVERAGE-STEP-5/5: Open test coverage HTML output in browser: xdg-open ./coverage/index.html"
|
|
||||||
COMMENT "Runs testrunner and generates coverage output (formats: .info and .html)")
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,13 +0,0 @@
|
||||||
prefix=@prefix@
|
|
||||||
exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
includedir=@includedir@
|
|
||||||
|
|
||||||
Name: libarchive
|
|
||||||
Description: library that can create and read several streaming archive formats
|
|
||||||
Version: @VERSION@
|
|
||||||
Cflags: -I${includedir}
|
|
||||||
Cflags.private: -DLIBARCHIVE_STATIC
|
|
||||||
Libs: -L${libdir} -larchive
|
|
||||||
Libs.private: @LIBS@
|
|
||||||
Requires.private: @LIBSREQUIRED@
|
|
|
@ -1 +0,0 @@
|
||||||
3006002
|
|
|
@ -1,18 +0,0 @@
|
||||||
DEFINE_TEST(test_0)
|
|
||||||
DEFINE_TEST(test_empty_gz)
|
|
||||||
DEFINE_TEST(test_empty_lz4)
|
|
||||||
DEFINE_TEST(test_empty_xz)
|
|
||||||
DEFINE_TEST(test_empty_zstd)
|
|
||||||
DEFINE_TEST(test_error)
|
|
||||||
DEFINE_TEST(test_error_mixed)
|
|
||||||
DEFINE_TEST(test_expand_Z)
|
|
||||||
DEFINE_TEST(test_expand_bz2)
|
|
||||||
DEFINE_TEST(test_expand_gz)
|
|
||||||
DEFINE_TEST(test_expand_lz4)
|
|
||||||
DEFINE_TEST(test_expand_mixed)
|
|
||||||
DEFINE_TEST(test_expand_plain)
|
|
||||||
DEFINE_TEST(test_expand_xz)
|
|
||||||
DEFINE_TEST(test_expand_zstd)
|
|
||||||
DEFINE_TEST(test_help)
|
|
||||||
DEFINE_TEST(test_stdin)
|
|
||||||
DEFINE_TEST(test_version)
|
|
File diff suppressed because it is too large
Load diff
25558
src/dependencies/libarchive-3.6.2/configure
vendored
25558
src/dependencies/libarchive-3.6.2/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,48 +0,0 @@
|
||||||
DEFINE_TEST(test_0)
|
|
||||||
DEFINE_TEST(test_basic)
|
|
||||||
DEFINE_TEST(test_cmdline)
|
|
||||||
DEFINE_TEST(test_extract_cpio_Z)
|
|
||||||
DEFINE_TEST(test_extract_cpio_bz2)
|
|
||||||
DEFINE_TEST(test_extract_cpio_grz)
|
|
||||||
DEFINE_TEST(test_extract_cpio_gz)
|
|
||||||
DEFINE_TEST(test_extract_cpio_lrz)
|
|
||||||
DEFINE_TEST(test_extract_cpio_lz)
|
|
||||||
DEFINE_TEST(test_extract_cpio_lz4)
|
|
||||||
DEFINE_TEST(test_extract_cpio_lzma)
|
|
||||||
DEFINE_TEST(test_extract_cpio_lzo)
|
|
||||||
DEFINE_TEST(test_extract_cpio_xz)
|
|
||||||
DEFINE_TEST(test_extract_cpio_zstd)
|
|
||||||
DEFINE_TEST(test_format_newc)
|
|
||||||
DEFINE_TEST(test_gcpio_compat)
|
|
||||||
DEFINE_TEST(test_missing_file)
|
|
||||||
DEFINE_TEST(test_option_0)
|
|
||||||
DEFINE_TEST(test_option_B_upper)
|
|
||||||
DEFINE_TEST(test_option_C_upper)
|
|
||||||
DEFINE_TEST(test_option_J_upper)
|
|
||||||
DEFINE_TEST(test_option_L_upper)
|
|
||||||
DEFINE_TEST(test_option_Z_upper)
|
|
||||||
DEFINE_TEST(test_option_a)
|
|
||||||
DEFINE_TEST(test_option_b64encode)
|
|
||||||
DEFINE_TEST(test_option_c)
|
|
||||||
DEFINE_TEST(test_option_d)
|
|
||||||
DEFINE_TEST(test_option_f)
|
|
||||||
DEFINE_TEST(test_option_grzip)
|
|
||||||
DEFINE_TEST(test_option_help)
|
|
||||||
DEFINE_TEST(test_option_l)
|
|
||||||
DEFINE_TEST(test_option_lrzip)
|
|
||||||
DEFINE_TEST(test_option_lz4)
|
|
||||||
DEFINE_TEST(test_option_lzma)
|
|
||||||
DEFINE_TEST(test_option_lzop)
|
|
||||||
DEFINE_TEST(test_option_m)
|
|
||||||
DEFINE_TEST(test_option_passphrase)
|
|
||||||
DEFINE_TEST(test_option_t)
|
|
||||||
DEFINE_TEST(test_option_u)
|
|
||||||
DEFINE_TEST(test_option_uuencode)
|
|
||||||
DEFINE_TEST(test_option_version)
|
|
||||||
DEFINE_TEST(test_option_xz)
|
|
||||||
DEFINE_TEST(test_option_y)
|
|
||||||
DEFINE_TEST(test_option_z)
|
|
||||||
DEFINE_TEST(test_option_zstd)
|
|
||||||
DEFINE_TEST(test_owner_parse)
|
|
||||||
DEFINE_TEST(test_passthrough_dotdot)
|
|
||||||
DEFINE_TEST(test_passthrough_reverse)
|
|
|
@ -1,133 +0,0 @@
|
||||||
|
|
||||||
default: all
|
|
||||||
|
|
||||||
|
|
||||||
archive_entry.3.html: ../../libarchive/archive_entry.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry.3 > archive_entry.3.html
|
|
||||||
|
|
||||||
archive_entry_acl.3.html: ../../libarchive/archive_entry_acl.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry_acl.3 > archive_entry_acl.3.html
|
|
||||||
|
|
||||||
archive_entry_linkify.3.html: ../../libarchive/archive_entry_linkify.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry_linkify.3 > archive_entry_linkify.3.html
|
|
||||||
|
|
||||||
archive_entry_misc.3.html: ../../libarchive/archive_entry_misc.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry_misc.3 > archive_entry_misc.3.html
|
|
||||||
|
|
||||||
archive_entry_paths.3.html: ../../libarchive/archive_entry_paths.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry_paths.3 > archive_entry_paths.3.html
|
|
||||||
|
|
||||||
archive_entry_perms.3.html: ../../libarchive/archive_entry_perms.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry_perms.3 > archive_entry_perms.3.html
|
|
||||||
|
|
||||||
archive_entry_stat.3.html: ../../libarchive/archive_entry_stat.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry_stat.3 > archive_entry_stat.3.html
|
|
||||||
|
|
||||||
archive_entry_time.3.html: ../../libarchive/archive_entry_time.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_entry_time.3 > archive_entry_time.3.html
|
|
||||||
|
|
||||||
archive_read.3.html: ../../libarchive/archive_read.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read.3 > archive_read.3.html
|
|
||||||
|
|
||||||
archive_read_add_passphrase.3.html: ../../libarchive/archive_read_add_passphrase.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_add_passphrase.3 > archive_read_add_passphrase.3.html
|
|
||||||
|
|
||||||
archive_read_data.3.html: ../../libarchive/archive_read_data.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_data.3 > archive_read_data.3.html
|
|
||||||
|
|
||||||
archive_read_disk.3.html: ../../libarchive/archive_read_disk.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_disk.3 > archive_read_disk.3.html
|
|
||||||
|
|
||||||
archive_read_extract.3.html: ../../libarchive/archive_read_extract.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_extract.3 > archive_read_extract.3.html
|
|
||||||
|
|
||||||
archive_read_filter.3.html: ../../libarchive/archive_read_filter.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_filter.3 > archive_read_filter.3.html
|
|
||||||
|
|
||||||
archive_read_format.3.html: ../../libarchive/archive_read_format.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_format.3 > archive_read_format.3.html
|
|
||||||
|
|
||||||
archive_read_free.3.html: ../../libarchive/archive_read_free.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_free.3 > archive_read_free.3.html
|
|
||||||
|
|
||||||
archive_read_header.3.html: ../../libarchive/archive_read_header.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_header.3 > archive_read_header.3.html
|
|
||||||
|
|
||||||
archive_read_new.3.html: ../../libarchive/archive_read_new.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_new.3 > archive_read_new.3.html
|
|
||||||
|
|
||||||
archive_read_open.3.html: ../../libarchive/archive_read_open.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_open.3 > archive_read_open.3.html
|
|
||||||
|
|
||||||
archive_read_set_options.3.html: ../../libarchive/archive_read_set_options.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_read_set_options.3 > archive_read_set_options.3.html
|
|
||||||
|
|
||||||
archive_util.3.html: ../../libarchive/archive_util.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_util.3 > archive_util.3.html
|
|
||||||
|
|
||||||
archive_write.3.html: ../../libarchive/archive_write.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write.3 > archive_write.3.html
|
|
||||||
|
|
||||||
archive_write_blocksize.3.html: ../../libarchive/archive_write_blocksize.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_blocksize.3 > archive_write_blocksize.3.html
|
|
||||||
|
|
||||||
archive_write_data.3.html: ../../libarchive/archive_write_data.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_data.3 > archive_write_data.3.html
|
|
||||||
|
|
||||||
archive_write_disk.3.html: ../../libarchive/archive_write_disk.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_disk.3 > archive_write_disk.3.html
|
|
||||||
|
|
||||||
archive_write_filter.3.html: ../../libarchive/archive_write_filter.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_filter.3 > archive_write_filter.3.html
|
|
||||||
|
|
||||||
archive_write_finish_entry.3.html: ../../libarchive/archive_write_finish_entry.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_finish_entry.3 > archive_write_finish_entry.3.html
|
|
||||||
|
|
||||||
archive_write_format.3.html: ../../libarchive/archive_write_format.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_format.3 > archive_write_format.3.html
|
|
||||||
|
|
||||||
archive_write_free.3.html: ../../libarchive/archive_write_free.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_free.3 > archive_write_free.3.html
|
|
||||||
|
|
||||||
archive_write_header.3.html: ../../libarchive/archive_write_header.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_header.3 > archive_write_header.3.html
|
|
||||||
|
|
||||||
archive_write_new.3.html: ../../libarchive/archive_write_new.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_new.3 > archive_write_new.3.html
|
|
||||||
|
|
||||||
archive_write_open.3.html: ../../libarchive/archive_write_open.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_open.3 > archive_write_open.3.html
|
|
||||||
|
|
||||||
archive_write_set_options.3.html: ../../libarchive/archive_write_set_options.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_set_options.3 > archive_write_set_options.3.html
|
|
||||||
|
|
||||||
archive_write_set_passphrase.3.html: ../../libarchive/archive_write_set_passphrase.3
|
|
||||||
groff -mdoc -T html ../../libarchive/archive_write_set_passphrase.3 > archive_write_set_passphrase.3.html
|
|
||||||
|
|
||||||
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_internals.3.html: ../../libarchive/libarchive_internals.3
|
|
||||||
groff -mdoc -T html ../../libarchive/libarchive_internals.3 > libarchive_internals.3.html
|
|
||||||
|
|
||||||
mtree.5.html: ../../libarchive/mtree.5
|
|
||||||
groff -mdoc -T html ../../libarchive/mtree.5 > mtree.5.html
|
|
||||||
|
|
||||||
tar.5.html: ../../libarchive/tar.5
|
|
||||||
groff -mdoc -T html ../../libarchive/tar.5 > tar.5.html
|
|
||||||
|
|
||||||
bsdtar.1.html: ../../tar/bsdtar.1
|
|
||||||
groff -mdoc -T html ../../tar/bsdtar.1 > bsdtar.1.html
|
|
||||||
|
|
||||||
bsdcpio.1.html: ../../cpio/bsdcpio.1
|
|
||||||
groff -mdoc -T html ../../cpio/bsdcpio.1 > bsdcpio.1.html
|
|
||||||
all: archive_entry.3.html archive_entry_acl.3.html archive_entry_linkify.3.html archive_entry_misc.3.html archive_entry_paths.3.html archive_entry_perms.3.html archive_entry_stat.3.html archive_entry_time.3.html archive_read.3.html archive_read_add_passphrase.3.html archive_read_data.3.html archive_read_disk.3.html archive_read_extract.3.html archive_read_filter.3.html archive_read_format.3.html archive_read_free.3.html archive_read_header.3.html archive_read_new.3.html archive_read_open.3.html archive_read_set_options.3.html archive_util.3.html archive_write.3.html archive_write_blocksize.3.html archive_write_data.3.html archive_write_disk.3.html archive_write_filter.3.html archive_write_finish_entry.3.html archive_write_format.3.html archive_write_free.3.html archive_write_header.3.html archive_write_new.3.html archive_write_open.3.html archive_write_set_options.3.html archive_write_set_passphrase.3.html cpio.5.html libarchive-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
|
|
|
@ -1,187 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_clear</b>,
|
|
||||||
<b>archive_entry_clone</b>, <b>archive_entry_free</b>,
|
|
||||||
<b>archive_entry_new</b> — functions for managing
|
|
||||||
archive entry descriptions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive_entry *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_clear</b>(<i>struct archive_entry *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive_entry *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_clone</b>(<i>struct archive_entry *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_free</b>(<i>struct archive_entry *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive_entry *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_new</b>(<i>void</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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 associated pathname, textual group and
|
|
||||||
user names, etc. These objects are used by libarchive(3) to
|
|
||||||
represent the metadata associated with a particular entry in
|
|
||||||
an archive.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Create and
|
|
||||||
Destroy</b> <br>
|
|
||||||
There are functions to allocate, destroy, clear, and copy
|
|
||||||
<i>archive_entry</i> objects:</p>
|
|
||||||
|
|
||||||
<p><b>archive_entry_clear</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>archive_entry_clone</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A deep copy operation; all text
|
|
||||||
fields are duplicated.</p>
|
|
||||||
|
|
||||||
<p><b>archive_entry_free</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Releases the struct
|
|
||||||
archive_entry object.</p>
|
|
||||||
|
|
||||||
<p><b>archive_entry_new</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Allocate and return a blank
|
|
||||||
struct archive_entry object.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Function
|
|
||||||
groups</b> <br>
|
|
||||||
Due to high number of functions, the accessor functions can
|
|
||||||
be found in man pages grouped by the purpose.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">archive_entry_acl(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">Access Control
|
|
||||||
List manipulation</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">archive_entry_paths(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">Path name
|
|
||||||
manipulation</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">archive_entry_perms(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">User, group and
|
|
||||||
mode manipulation</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">archive_entry_stat(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">Functions not
|
|
||||||
in the other groups and copying to/from <i>struct
|
|
||||||
stat</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">archive_entry_time(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">Time field
|
|
||||||
manipulation</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Most of the
|
|
||||||
functions set or read entries in an object. Such functions
|
|
||||||
have one of the following forms:</p>
|
|
||||||
|
|
||||||
<p><b>archive_entry_set_XXXX</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Stores the provided data in the
|
|
||||||
object. In particular, for strings, the pointer is stored,
|
|
||||||
not the referenced string.</p>
|
|
||||||
|
|
||||||
<p><b>archive_entry_copy_XXXX</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">As above, except that the
|
|
||||||
referenced data is copied into the object.</p>
|
|
||||||
|
|
||||||
<p><b>archive_entry_XXXX</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns the specified data. In
|
|
||||||
the case of strings, a const-qualified pointer to the string
|
|
||||||
is returned.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">String data can be set or
|
|
||||||
accessed as wide character strings or normal <i>char</i>
|
|
||||||
strings. The functions that use wide character strings are
|
|
||||||
suffixed with <b>_w</b>. 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 discarded in favor of the new data.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry_acl(3),
|
|
||||||
archive_entry_paths(3), archive_entry_perms(3),
|
|
||||||
archive_entry_time(3), libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle <kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,570 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY_ACL(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_acl_add_entry</b>,
|
|
||||||
<b>archive_entry_acl_add_entry_w</b>,
|
|
||||||
<b>archive_entry_acl_clear</b>,
|
|
||||||
<b>archive_entry_acl_count</b>,
|
|
||||||
<b>archive_entry_acl_from_text</b>,
|
|
||||||
<b>archive_entry_acl_from_text_w</b>,
|
|
||||||
<b>archive_entry_acl_next</b>,
|
|
||||||
<b>archive_entry_acl_reset</b>,
|
|
||||||
<b>archive_entry_acl_to_text</b>,
|
|
||||||
<b>archive_entry_acl_to_text_w</b>,
|
|
||||||
<b>archive_entry_acl_types</b> — functions for
|
|
||||||
manipulating Access Control Lists in archive entry
|
|
||||||
descriptions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_acl_add_entry</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int type</i>, <i>int permset</i>,
|
|
||||||
<i>int tag</i>, <i>int qualifier</i>,
|
|
||||||
<i>const char *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_acl_add_entry_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int type</i>, <i>int permset</i>,
|
|
||||||
<i>int tag</i>, <i>int qualifier</i>,
|
|
||||||
<i>const wchar_t *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_acl_clear</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_acl_count</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int type</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_acl_from_text</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *text</i>,
|
|
||||||
<i>int type</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_acl_from_text_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const wchar_t *text</i>,
|
|
||||||
<i>int type</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_acl_next</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int type</i>, <i>int *ret_type</i>,
|
|
||||||
<i>int *ret_permset</i>, <i>int *ret_tag</i>,
|
|
||||||
<i>int *ret_qual</i>,
|
|
||||||
<i>const char **ret_name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_acl_reset</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int type</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_acl_to_text</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>ssize_t *len_p</i>, <i>int flags</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>wchar_t
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_acl_to_text_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>ssize_t *len_p</i>, <i>int flags</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_acl_types</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The “Access Control Lists
|
|
||||||
(ACLs)” extend the standard Unix permission model. The
|
|
||||||
ACL interface of <b>libarchive</b> supports both POSIX.1e
|
|
||||||
and NFSv4 style ACLs. Use of ACLs is restricted by various
|
|
||||||
levels of ACL support in operating systems, file systems and
|
|
||||||
archive formats.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>POSIX.1e
|
|
||||||
Access Control Lists</b> <br>
|
|
||||||
A POSIX.1e ACL consists of a number of independent entries.
|
|
||||||
Each entry specifies the permission set as a bitmask of
|
|
||||||
basic permissions. Valid permissions in the <i>permset</i>
|
|
||||||
are:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_READ (<b>r</b>) <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_WRITE (<b>w</b>) <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_EXECUTE (<b>x</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The permissions correspond to
|
|
||||||
the normal Unix permissions.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The <i>tag</i>
|
|
||||||
specifies the principal to which the permission applies.
|
|
||||||
Valid values are:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_USER</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The user specified by the name
|
|
||||||
field.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_USER_OBJ</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The owner of the file.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_GROUP</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The group specified by the name
|
|
||||||
field.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_GROUP_OBJ</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The group which owns the
|
|
||||||
file.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_MASK</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The maximum permissions to be
|
|
||||||
obtained via group permissions.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_OTHER</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">Any principal who is not the
|
|
||||||
file owner or a member of the owning group.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The principals
|
|
||||||
ARCHIVE_ENTRY_ACL_USER_OBJ, ARCHIVE_ENTRY_ACL_GROUP_OBJ and
|
|
||||||
ARCHIVE_ENTRY_ACL_OTHER are equivalent to user, group and
|
|
||||||
other in the classic Unix permission model and specify
|
|
||||||
non-extended ACL entries.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">All files have
|
|
||||||
an access ACL (ARCHIVE_ENTRY_ACL_TYPE_ACCESS). This
|
|
||||||
specifies the permissions required for access to the file
|
|
||||||
itself. Directories have an additional ACL
|
|
||||||
(ARCHIVE_ENTRY_ACL_TYPE_DEFAULT), which controls the initial
|
|
||||||
access ACL for newly-created directory entries.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>NFSv4 Access
|
|
||||||
Control Lists</b> <br>
|
|
||||||
A NFSv4 ACL consists of multiple individual entries called
|
|
||||||
Access Control Entries (ACEs).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">There are four
|
|
||||||
possible types of a NFSv4 ACE:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_ALLOW</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">Allow principal to perform
|
|
||||||
actions requiring given permissions.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_DENY</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">Prevent principal from
|
|
||||||
performing actions requiring given permissions.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_AUDIT</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">Log access attempts by
|
|
||||||
principal which require given permissions.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_ALARM</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">Trigger a system alarm on
|
|
||||||
access attempts by principal which require given
|
|
||||||
permissions.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The <i>tag</i>
|
|
||||||
specifies the principal to which the permission applies.
|
|
||||||
Valid values are:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_USER</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The user specified by the name
|
|
||||||
field.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_USER_OBJ</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The owner of the file.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_GROUP</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The group specified by the name
|
|
||||||
field.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_GROUP_OBJ</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">The group which owns the
|
|
||||||
file.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_EVERYONE</p>
|
|
||||||
|
|
||||||
<p style="margin-left:51%;">Any principal who is not the
|
|
||||||
file owner or a member of the owning group.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Entries with the
|
|
||||||
ARCHIVE_ENTRY_ACL_USER or ARCHIVE_ENTRY_ACL_GROUP tag store
|
|
||||||
the user and group name in the <i>name</i> string and
|
|
||||||
optionally the user or group ID in the <i>qualifier</i>
|
|
||||||
integer.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">NFSv4 ACE
|
|
||||||
permissions and flags are stored in the same <i>permset</i>
|
|
||||||
bitfield. Some permissions share the same constant and
|
|
||||||
permission character but have different effect on
|
|
||||||
directories than on files. The following ACE permissions are
|
|
||||||
supported:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_READ_DATA (<b>r</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Read data (file).</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (<b>r</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">List entries (directory).</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_WRITE_DATA (<b>w</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Write data (file).</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ADD_FILE (<b>w</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Create files (directory).</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_EXECUTE (<b>x</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Execute file or change into a
|
|
||||||
directory.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_APPEND_DATA (<b>p</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Append data (file).</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (<b>p</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Create subdirectories
|
|
||||||
(directory).</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_DELETE_CHILD (<b>D</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Remove files and subdirectories
|
|
||||||
inside a directory.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_DELETE (<b>d</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Remove file or directory.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (<b>a</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Read file or directory
|
|
||||||
attributes.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (<b>A</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Write file or directory
|
|
||||||
attributes.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (<b>R</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Read named file or directory
|
|
||||||
attributes.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (<b>W</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Write named file or directory
|
|
||||||
attributes.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_READ_ACL (<b>c</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Read file or directory ACL.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_WRITE_ACL (<b>C</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Write file or directory
|
|
||||||
ACL.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_WRITE_OWNER (<b>o</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Change owner of a file or
|
|
||||||
directory.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_SYNCHRONIZE (<b>s</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Use synchronous I/O.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The following
|
|
||||||
NFSv4 ACL inheritance flags are supported:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (<b>f</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Inherit parent directory ACE to
|
|
||||||
files.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (<b>d</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Inherit parent directory ACE to
|
|
||||||
subdirectories.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (<b>i</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Only inherit, do not apply the
|
|
||||||
permission on the directory itself.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT
|
|
||||||
(<b>n</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Do not propagate inherit flags.
|
|
||||||
Only first-level entries inherit ACLs.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (<b>S</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Trigger alarm or audit on
|
|
||||||
successful access.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (<b>F</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Trigger alarm or audit on
|
|
||||||
failed access.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (<b>I</b>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Mark that ACE was
|
|
||||||
inherited.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Functions
|
|
||||||
<br>
|
|
||||||
archive_entry_acl_add_entry</b>() and
|
|
||||||
<b>archive_entry_acl_add_entry_w</b>() add a single ACL
|
|
||||||
entry. For the access ACL and non-extended principals, the
|
|
||||||
classic Unix permissions are updated. An archive entry
|
|
||||||
cannot contain both POSIX.1e and NFSv4 ACL entries.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_clear</b>()
|
|
||||||
removes all ACL entries and resets the enumeration
|
|
||||||
pointer.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_count</b>()
|
|
||||||
counts the ACL entries that have the given type mask.
|
|
||||||
<i>type</i> can be the bitwise-or of</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_ACCESS <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">for POSIX.1e
|
|
||||||
ACLs and</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_ALLOW <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_DENY <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_AUDIT <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_ALARM</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">for NFSv4 ACLs.
|
|
||||||
For POSIX.1e ACLs if ARCHIVE_ENTRY_ACL_TYPE_ACCESS is
|
|
||||||
included and at least one extended ACL entry is found, the
|
|
||||||
three non-extended ACLs are added.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_from_text</b>()
|
|
||||||
and <b>archive_entry_acl_from_text_w</b>() add new (or merge
|
|
||||||
with existing) ACL entries from (wide) text. The argument
|
|
||||||
<i>type</i> may take one of the following values:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_ACCESS <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT <br>
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_NFS4</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Supports all
|
|
||||||
formats that can be created with
|
|
||||||
<b>archive_entry_acl_to_text</b>() or respectively
|
|
||||||
<b>archive_entry_acl_to_text_w</b>(). Existing ACL entries
|
|
||||||
are preserved. To get a clean new ACL from text
|
|
||||||
<b>archive_entry_acl_clear</b>() must be called first.
|
|
||||||
Entries prefixed with “default:” are treated as
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT unless <i>type</i> is
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_NFS4. Invalid entries, non-parseable
|
|
||||||
ACL entries and entries beginning with the ’#’
|
|
||||||
character (comments) are skipped.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_next</b>()
|
|
||||||
return the next entry of the ACL list. This functions may
|
|
||||||
only be called after <b>archive_entry_acl_reset</b>() has
|
|
||||||
indicated the presence of extended ACL entries.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_reset</b>()
|
|
||||||
prepare reading the list of ACL entries with
|
|
||||||
<b>archive_entry_acl_next</b>(). The function returns 0 if
|
|
||||||
no non-extended ACLs are found. In this case, the access
|
|
||||||
permissions should be obtained by archive_entry_mode(3) or
|
|
||||||
set using chmod(2). Otherwise, the function returns the same
|
|
||||||
value as <b>archive_entry_acl_count</b>().</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text</b>()
|
|
||||||
and <b>archive_entry_acl_to_text_w</b>() convert the ACL
|
|
||||||
entries for the given type into a (wide) string of ACL
|
|
||||||
entries separated by newline. If the pointer <i>len_p</i> is
|
|
||||||
not NULL, then the function shall return the length of the
|
|
||||||
string (not including the NULL terminator) in the location
|
|
||||||
pointed to by <i>len_p</i>. The <i>flag</i> argument is a
|
|
||||||
bitwise-or.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The following
|
|
||||||
flags are effective only on POSIX.1e ACL:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_ACCESS</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Output access ACLs.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_TYPE_DEFAULT</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Output POSIX.1e default
|
|
||||||
ACLs.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Prefix each default ACL entry
|
|
||||||
with the word “default:”.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_STYLE_SOLARIS</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">The mask and other ACLs don not
|
|
||||||
contain a double colon.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The following
|
|
||||||
flags are effecive only on NFSv4 ACL:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_STYLE_COMPACT</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Do not output minus characters
|
|
||||||
for unset permissions and flags in NFSv4 ACL permission and
|
|
||||||
flag fields.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The following
|
|
||||||
flags are effective on both POSIX.1e and NFSv4 ACL:</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Add an additional
|
|
||||||
colon-separated field containing the user or group id.</p>
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA</p>
|
|
||||||
|
|
||||||
<p style="margin-left:24%;">Separate ACL entries with comma
|
|
||||||
instead of newline.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">If the archive
|
|
||||||
entry contains NFSv4 ACLs, all types of NFSv4 ACLs are
|
|
||||||
returned. It the entry contains POSIX.1e ACLs and none of
|
|
||||||
the flags ARCHIVE_ENTRY_ACL_TYPE_ACCESS or
|
|
||||||
ARCHIVE_ENTRY_ACL_TYPE_DEFAULT are specified, both access
|
|
||||||
and default entries are returned and default entries are
|
|
||||||
prefixed with “default:”.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_types</b>()
|
|
||||||
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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_acl_count</b>()
|
|
||||||
and <b>archive_entry_acl_reset</b>() returns the number of
|
|
||||||
ACL entries that match the given type mask. For POSIX.1e
|
|
||||||
ACLS if the type mask includes ARCHIVE_ENTRY_ACL_TYPE_ACCESS
|
|
||||||
and at least one extended ACL entry exists, the three
|
|
||||||
classic Unix permissions are counted.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_from_text</b>()
|
|
||||||
and <b>archive_entry_acl_from_text_w</b>() return ARCHIVE_OK
|
|
||||||
if all entries were successfully parsed and ARCHIVE_WARN if
|
|
||||||
one or more entries were invalid or non-parseable.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_next</b>()
|
|
||||||
returns ARCHIVE_OK on success, ARCHIVE_EOF if no more ACL
|
|
||||||
entries exist and ARCHIVE_WARN if
|
|
||||||
<b>archive_entry_acl_reset</b>() has not been called
|
|
||||||
first.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text</b>()
|
|
||||||
returns a string representing the ACL entries matching the
|
|
||||||
given type and flags on success or NULL on error.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_to_text_w</b>()
|
|
||||||
returns a wide string representing the ACL entries matching
|
|
||||||
the given type and flags on success or NULL on error.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_acl_types</b>()
|
|
||||||
returns a bitmask of ACL entry types or 0 if archive entry
|
|
||||||
has no ACL entries.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 15, 2017 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,212 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_LINKIFY(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY_LINKIFY(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_linkresolver</b>,
|
|
||||||
<b>archive_entry_linkresolver_new</b>,
|
|
||||||
<b>archive_entry_linkresolver_set_strategy</b>,
|
|
||||||
<b>archive_entry_linkresolver_free</b>,
|
|
||||||
<b>archive_entry_linkify</b> — hardlink resolver
|
|
||||||
functions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive_entry_linkresolver *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_linkresolver_new</b>(<i>void</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_linkresolver_set_strategy</b>(<i>struct archive_entry_linkresolver *resolver</i>,
|
|
||||||
<i>int format</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_linkresolver_free</b>(<i>struct archive_entry_linkresolver *resolver</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_linkify</b>(<i>struct archive_entry_linkresolver *resolver</i>,
|
|
||||||
<i>struct archive_entry **entry</i>,
|
|
||||||
<i>struct archive_entry **sparse</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">1.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">Ignore hardlinks and store the
|
|
||||||
body for each reference (old cpio, zip).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">2.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">Store the body the first time
|
|
||||||
an inode is seen (ustar, pax).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">3.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">Store the body the last time an
|
|
||||||
inode is seen (new cpio).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The
|
|
||||||
<b>archive_entry_linkresolver</b> functions help by
|
|
||||||
providing a unified interface and handling the complexity
|
|
||||||
behind the scene.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The
|
|
||||||
<b>archive_entry_linkresolver</b> functions assume that
|
|
||||||
<i>archive_entry</i> 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 references
|
|
||||||
can be recycled.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The
|
|
||||||
<b>archive_entry_linkresolver_new</b>() function allocates a
|
|
||||||
new link resolver. The instance can be freed using
|
|
||||||
<b>archive_entry_linkresolver_free</b>(). All deferred
|
|
||||||
entries are flushed and the internal storage is freed.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The
|
|
||||||
<b>archive_entry_linkresolver_set_strategy</b>() function
|
|
||||||
selects the optimal 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The
|
|
||||||
<b>archive_entry_linkify</b>() function is the core of
|
|
||||||
<b>archive_entry_linkresolver</b>. The <b>entry</b>()
|
|
||||||
argument points to the <i>archive_entry</i> that should be
|
|
||||||
written. Depending on the strategy one of the following
|
|
||||||
actions is taken:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">1.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">For the simple archive formats
|
|
||||||
<i>*entry</i> is left unmodified and <i>*sparse</i> is set
|
|
||||||
to NULL.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">2.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">For tar like archive formats,
|
|
||||||
<i>*sparse</i> is set to NULL. If <i>*entry</i> is NULL, no
|
|
||||||
action is taken. If the hardlink count of <i>*entry</i> 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 <i>*entry</i> 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">3.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">For new cpio like archive
|
|
||||||
formats a value for <i>*entry</i> of NULL is used to flush
|
|
||||||
deferred entries. In that case <i>*entry</i> is set to an
|
|
||||||
arbitrary deferred entry and the entry itself is removed
|
|
||||||
from the internal list. If the internal list is empty,
|
|
||||||
<i>*entry</i> is set to NULL. In either case, <i>*sparse</i>
|
|
||||||
is set to NULL and the function returns. If the hardlink
|
|
||||||
count of <i>*entry</i> is one or the file type is a
|
|
||||||
directory or device, <i>*sparse</i> 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
|
|
||||||
<i>*entry</i> and <i>*sparse</i> 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 <i>*entry</i>
|
|
||||||
after retaining the link count. The existing entry is
|
|
||||||
returned in <i>*entry</i>. If the link count reached one,
|
|
||||||
the new entry is also removed from the internal list and
|
|
||||||
returned in <i>*sparse</i>. Otherwise <i>*sparse</i> is set
|
|
||||||
to NULL.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The general
|
|
||||||
usage is therefore:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">1.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">For each new archive entry,
|
|
||||||
call <b>archive_entry_linkify</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">2.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">Keep in mind that the entries
|
|
||||||
returned may have a size of 0 now.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">3.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">If <i>*entry</i> is not NULL,
|
|
||||||
archive it.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">4.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">If <i>*sparse</i> is not NULL,
|
|
||||||
archive it.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">5.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">After all entries have been
|
|
||||||
written to disk, call <b>archive_entry_linkify</b>() with
|
|
||||||
<i>*entry</i> set to NULL and archive the returned entry as
|
|
||||||
long as it is not NULL.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_linkresolver_new</b>()
|
|
||||||
returns NULL on malloc(3) failures.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,91 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_MISC(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY_MISC(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_symlink_type</b>,
|
|
||||||
<b>archive_entry_set_symlink_type</b> — miscellaneous
|
|
||||||
functions for manipulating properties of archive_entry</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_symlink_type</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_symlink_type</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The function
|
|
||||||
<b>archive_entry_symlink_type</b>() returns and the function
|
|
||||||
<b>archive_entry_set_symlink_type</b>() sets the type of the
|
|
||||||
symbolic link stored in an archive entry. These functions
|
|
||||||
have special meaning on operating systems that support
|
|
||||||
multiple symbolic link types (e.g. Microsoft Windows).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Supported values
|
|
||||||
are:</p>
|
|
||||||
|
|
||||||
<p>AE_SYMLINK_TYPE_UNDEFINED</p>
|
|
||||||
|
|
||||||
<p style="margin-left:41%; margin-top: 1em">Symbolic link
|
|
||||||
target type is not defined (default on unix systems)</p>
|
|
||||||
|
|
||||||
<p>AE_SYMLINK_TYPE_FILE</p>
|
|
||||||
|
|
||||||
<p style="margin-left:41%; margin-top: 1em">Symbolic link
|
|
||||||
points to a file</p>
|
|
||||||
|
|
||||||
<p>AE_SYMLINK_TYPE_DIRECTORY</p>
|
|
||||||
|
|
||||||
<p style="margin-left:41%; margin-top: 1em">Symbolic link
|
|
||||||
points to a directory</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry(3),
|
|
||||||
archive_entry_paths(3), archive_entry_stat(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
April 15, 2019 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,284 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_PATHS(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY_PATHS(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_hardlink</b>,
|
|
||||||
<b>archive_entry_hardlink_w</b>,
|
|
||||||
<b>archive_entry_set_hardlink</b>,
|
|
||||||
<b>archive_entry_copy_hardlink</b>,
|
|
||||||
<b>archive_entry_copy_hardlink_w</b>,
|
|
||||||
<b>archive_entry_update_hardlink_utf8</b>,
|
|
||||||
<b>archive_entry_set_link</b>,
|
|
||||||
<b>archive_entry_copy_link</b>,
|
|
||||||
<b>archive_entry_copy_link_w</b>,
|
|
||||||
<b>archive_entry_update_link_utf8</b>,
|
|
||||||
<b>archive_entry_pathname</b>,
|
|
||||||
<b>archive_entry_pathname_w</b>,
|
|
||||||
<b>archive_entry_set_pathname</b>,
|
|
||||||
<b>archive_entry_copy_pathname</b>,
|
|
||||||
<b>archive_entry_copy_pathname_w</b>,
|
|
||||||
<b>archive_entry_update_pathname_utf8</b>,
|
|
||||||
<b>archive_entry_sourcepath</b>,
|
|
||||||
<b>archive_entry_copy_sourcepath</b>,
|
|
||||||
<b>archive_entry_symlink</b>,
|
|
||||||
<b>archive_entry_symlink_w</b>,
|
|
||||||
<b>archive_entry_set_symlink</b>,
|
|
||||||
<b>archive_entry_copy_symlink</b>,
|
|
||||||
<b>archive_entry_copy_symlink_w</b>,
|
|
||||||
<b>archive_entry_update_symlink_utf8</b> — functions
|
|
||||||
for manipulating path names in archive entry
|
|
||||||
descriptions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_hardlink</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const wchar_t
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_hardlink_w</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_hardlink</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_hardlink</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_hardlink_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const</i>, <i>wchar_t</i>, <i>*path"</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_update_hardlink_utf8</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_link</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_link</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_link_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const wchar_t *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_update_link_utf8</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_pathname</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const wchar_t
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_pathname_w</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_pathname</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_pathname</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_pathname_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const wchar_t *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_update_pathname_utf8</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_sourcepath</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_sourcepath</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_symlink</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const wchar_t
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_symlink_w</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_symlink</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_symlink</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_symlink_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const wchar_t *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_update_symlink_utf8</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *path</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Path names supported by
|
|
||||||
archive_entry(3):</p>
|
|
||||||
|
|
||||||
<p>hardlink</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Destination of
|
|
||||||
the hardlink.</p>
|
|
||||||
|
|
||||||
<p>link</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Update only.
|
|
||||||
For a symlink, update the destination. Otherwise, make the
|
|
||||||
entry a hardlink and alter the destination for that.</p>
|
|
||||||
|
|
||||||
<p>pathname</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Path in the
|
|
||||||
archive</p>
|
|
||||||
|
|
||||||
<p>sourcepath</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Path on the
|
|
||||||
disk for use by archive_read_disk(3).</p>
|
|
||||||
|
|
||||||
<p>symlink</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Destination of
|
|
||||||
the symbolic link.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Path names can
|
|
||||||
be provided in one of three different ways:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">char *</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">Multibyte
|
|
||||||
strings in the current locale.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">wchar_t *</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">Wide character
|
|
||||||
strings in the current locale. The accessor functions are
|
|
||||||
named <b>XXX_w</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">UTF-8</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">Unicode strings
|
|
||||||
encoded as UTF-8. These are convenience functions to update
|
|
||||||
both the multibyte and wide character strings at the same
|
|
||||||
time.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The sourcepath
|
|
||||||
is a pure filesystem concept and never stored in an archive
|
|
||||||
directly.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">For that reason,
|
|
||||||
it is only available as multibyte string. The link path is a
|
|
||||||
convenience function for conditionally setting hardlink or
|
|
||||||
symlink destination. It doesn’t have a corresponding
|
|
||||||
get accessor function.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_set_XXX</b>()
|
|
||||||
is an alias for <b>archive_entry_copy_XXX</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,315 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_PERMS(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY_PERMS(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_gid</b>,
|
|
||||||
<b>archive_entry_set_gid</b>, <b>archive_entry_uid</b>,
|
|
||||||
<b>archive_entry_set_uid</b>, <b>archive_entry_perm</b>,
|
|
||||||
<b>archive_entry_set_perm</b>, <b>archive_entry_strmode</b>,
|
|
||||||
<b>archive_entry_uname</b>, <b>archive_entry_uname_w</b>,
|
|
||||||
<b>archive_entry_set_uname</b>,
|
|
||||||
<b>archive_entry_copy_uname</b>,
|
|
||||||
<b>archive_entry_copy_uname_w</b>,
|
|
||||||
<b>archive_entry_update_uname_utf8</b>,
|
|
||||||
<b>archive_entry_gname</b>, <b>archive_entry_gname_w</b>,
|
|
||||||
<b>archive_entry_set_gname</b>,
|
|
||||||
<b>archive_entry_copy_gname</b>,
|
|
||||||
<b>archive_entry_copy_gname_w</b>,
|
|
||||||
<b>archive_entry_update_gname_utf8</b>,
|
|
||||||
<b>archive_entry_fflags</b>,
|
|
||||||
<b>archive_entry_fflags_text</b>,
|
|
||||||
<b>archive_entry_set_fflags</b>,
|
|
||||||
<b>archive_entry_copy_fflags_text</b>,
|
|
||||||
<b>archive_entry_copy_fflags_text_w</b> — functions
|
|
||||||
for manipulating ownership and permissions in archive entry
|
|
||||||
descriptions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>gid_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_gid</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_gid</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>gid_t gid</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>uid_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_uid</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_uid</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>uid_t uid</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>mode_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_perm</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_perm</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>mode_t mode</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_strmode</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_gname</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const wchar_t
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_gname_w</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_gname</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_gname</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_gname_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const wchar_t *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_update_gname_utf8</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_uname</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const wchar_t
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_uname_w</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_uname</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_uname</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_uname_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const wchar_t *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_update_uname_utf8</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_fflags</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>unsigned long *set_bits</i>,
|
|
||||||
<i>unsigned long *clear_bits</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_fflags_text</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_entry_set_fflags</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>unsigned long set_bits</i>,
|
|
||||||
<i>unsigned long clear_bits</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_fflags_text</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const char *text</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const wchar_t
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_fflags_text_w</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const wchar_t *text</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>User id, group id and
|
|
||||||
mode</b> <br>
|
|
||||||
The functions <b>archive_entry_uid</b>(),
|
|
||||||
<b>archive_entry_gid</b>(), and <b>archive_entry_perm</b>()
|
|
||||||
can be used to extract the user id, group id and permission
|
|
||||||
from the given entry. The corresponding functions
|
|
||||||
<b>archive_entry_set_uid</b>(),
|
|
||||||
<b>archive_entry_set_gid</b>(), and
|
|
||||||
<b>archive_entry_set_perm</b>() store the given user id,
|
|
||||||
group id and permission in the entry. The permission is also
|
|
||||||
set as a side effect of calling
|
|
||||||
<b>archive_entry_set_mode</b>().</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_strmode</b>()
|
|
||||||
returns a string representation of the permission as used by
|
|
||||||
the long mode of ls(1).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>User and
|
|
||||||
group name</b> <br>
|
|
||||||
User and group names can be provided in one of three
|
|
||||||
different ways:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">char *</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">Multibyte
|
|
||||||
strings in the current locale.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">wchar_t *</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">Wide character
|
|
||||||
strings in the current locale. The accessor functions are
|
|
||||||
named <b>XXX_w</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">UTF-8</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">Unicode strings
|
|
||||||
encoded as UTF-8. These are convenience functions to update
|
|
||||||
both the multibyte and wide character strings at the same
|
|
||||||
time.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_entry_set_XXX</b>()
|
|
||||||
is an alias for <b>archive_entry_copy_XXX</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>File
|
|
||||||
Flags</b> <br>
|
|
||||||
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 set a text format and
|
|
||||||
request a text format, you will get back the same text, even
|
|
||||||
if it is ill-formed. If you need to canonicalize a textual
|
|
||||||
flags string, you should first set the text form, then
|
|
||||||
request the bitmap form, then use that to set the bitmap
|
|
||||||
form. Setting the bitmap format will clear the internal text
|
|
||||||
representation and force it to be reconstructed when you
|
|
||||||
next request the text form.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The bitmap
|
|
||||||
format consists of two integers, one containing bits that
|
|
||||||
should be set, the other specifying bits that should be
|
|
||||||
cleared. Bits not mentioned in either bitmap will be
|
|
||||||
ignored. Usually, the bitmap of bits to be cleared will be
|
|
||||||
set to zero. In unusual circumstances, you can force a
|
|
||||||
fully-specified set of file flags by setting the bitmap of
|
|
||||||
flags to clear to the complement of the bitmap of flags to
|
|
||||||
set. (This differs from fflagstostr(3), which only includes
|
|
||||||
names for set bits.) Converting a bitmap to a textual string
|
|
||||||
is a platform-specific operation; bits that are not
|
|
||||||
meaningful on the current platform will be ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The canonical
|
|
||||||
text format is a comma-separated list of flag names. The
|
|
||||||
<b>archive_entry_copy_fflags_text</b>() and
|
|
||||||
<b>archive_entry_copy_fflags_text_w</b>() functions parse
|
|
||||||
the provided text and set the internal bitmap values. This
|
|
||||||
is a platform-specific operation; names that are not
|
|
||||||
meaningful on the current platform will be ignored. The
|
|
||||||
function returns a pointer to the start of the first name
|
|
||||||
that was not recognized, or NULL if every name was
|
|
||||||
recognized. Note that every name — including names
|
|
||||||
that follow an unrecognized name — will be evaluated,
|
|
||||||
and the bitmaps will be set to reflect every name that is
|
|
||||||
recognized. (In particular, this differs from
|
|
||||||
strtofflags(3), which stops parsing at the first
|
|
||||||
unrecognized name.)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry(3),
|
|
||||||
archive_entry_acl(3), archive_read_disk(3),
|
|
||||||
archive_write_disk(3), libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The platform types <i>uid_t</i>
|
|
||||||
and <i>gid_t</i> are often 16 or 32 bit wide. In this case
|
|
||||||
it is possible that the ids can not be correctly restored
|
|
||||||
from archives and get truncated.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,381 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_STAT(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY_STAT(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_stat</b>,
|
|
||||||
<b>archive_entry_copy_stat</b>,
|
|
||||||
<b>archive_entry_filetype</b>,
|
|
||||||
<b>archive_entry_set_filetype</b>,
|
|
||||||
<b>archive_entry_mode</b>, <b>archive_entry_set_mode</b>,
|
|
||||||
<b>archive_entry_size</b>, <b>archive_entry_size_is_set</b>,
|
|
||||||
<b>archive_entry_set_size</b>,
|
|
||||||
<b>archive_entry_unset_size</b>, <b>archive_entry_dev</b>,
|
|
||||||
<b>archive_entry_set_dev</b>,
|
|
||||||
<b>archive_entry_dev_is_set</b>,
|
|
||||||
<b>archive_entry_devmajor</b>,
|
|
||||||
<b>archive_entry_set_devmajor</b>,
|
|
||||||
<b>archive_entry_devminor</b>,
|
|
||||||
<b>archive_entry_set_devminor</b>, <b>archive_entry_ino</b>,
|
|
||||||
<b>archive_entry_set_ino</b>,
|
|
||||||
<b>archive_entry_ino_is_set</b>, <b>archive_entry_ino64</b>,
|
|
||||||
<b>archive_entry_set_ino64</b>, <b>archive_entry_nlink</b>,
|
|
||||||
<b>archive_entry_rdev</b>, <b>archive_entry_set_rdev</b>,
|
|
||||||
<b>archive_entry_rdevmajor</b>,
|
|
||||||
<b>archive_entry_set_rdevmajor</b>,
|
|
||||||
<b>archive_entry_rdevminor</b>,
|
|
||||||
<b>archive_entry_set_rdevminor</b> — accessor
|
|
||||||
functions for manipulating archive entry descriptions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const struct
|
|
||||||
stat *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_stat</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_copy_stat</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>const struct stat *sb</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>mode_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_filetype</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_filetype</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>unsigned int type</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>mode_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_mode</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_mode</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>mode_t mode</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int64_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_size</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_size_is_set</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_size</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int64_t size</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_unset_size</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>dev_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_dev</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_dev</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>dev_t dev</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_dev_is_set</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>dev_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_devmajor</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_devmajor</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>dev_t major</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>dev_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_devminor</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_devminor</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>dev_t minor</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>ino_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_ino</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_ino</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>unsigned long ino</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_ino_is_set</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int64_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_ino64</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_ino64</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>int64_t ino</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>unsigned
|
|
||||||
int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_nlink</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_nlink</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>unsigned int count</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>dev_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_rdev</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>dev_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_rdevmajor</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>dev_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_rdevminor</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_rdev</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>dev_t dev</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_rdevmajor</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>dev_t major</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_rdevminor</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>dev_t minor</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>Copying to and from</b>
|
|
||||||
<i>struct stat</i> <br>
|
|
||||||
The function <b>archive_entry_stat</b>() converts the
|
|
||||||
various fields stored in the archive entry to the format
|
|
||||||
used by stat(2). The return value remains valid until either
|
|
||||||
<b>archive_entry_clear</b>() or <b>archive_entry_free</b>()
|
|
||||||
is called. It is not affected by calls to the set accessor
|
|
||||||
functions. It currently sets the following values in
|
|
||||||
<i>struct stat</i>: <i>st_atime</i>, <i>st_ctime</i>,
|
|
||||||
<i>st_dev</i>, <i>st_gid</i>, <i>st_ino</i>, <i>st_mode</i>,
|
|
||||||
<i>st_mtime</i>, <i>st_nlink</i>, <i>st_rdev</i>,
|
|
||||||
<i>st_size</i>, <i>st_uid</i>. In addition,
|
|
||||||
<i>st_birthtime</i> and high-precision information for
|
|
||||||
time-related fields will be included on platforms that
|
|
||||||
support it.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The function
|
|
||||||
<b>archive_entry_copy_stat</b>() copies fields from the
|
|
||||||
platform’s <i>struct stat</i>. Fields not provided by
|
|
||||||
<i>struct stat</i> are unchanged.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>General
|
|
||||||
accessor functions</b> <br>
|
|
||||||
The functions <b>archive_entry_filetype</b>() and
|
|
||||||
<b>archive_entry_set_filetype</b>() get respectively set the
|
|
||||||
filetype. The file type is one of the following
|
|
||||||
constants:</p>
|
|
||||||
|
|
||||||
<p>AE_IFREG</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Regular
|
|
||||||
file</p>
|
|
||||||
|
|
||||||
<p>AE_IFLNK</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Symbolic
|
|
||||||
link</p>
|
|
||||||
|
|
||||||
<p>AE_IFSOCK</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Socket</p>
|
|
||||||
|
|
||||||
<p>AE_IFCHR</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Character
|
|
||||||
device</p>
|
|
||||||
|
|
||||||
<p>AE_IFBLK</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Block
|
|
||||||
device</p>
|
|
||||||
|
|
||||||
<p>AE_IFDIR</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Directory</p>
|
|
||||||
|
|
||||||
<p>AE_IFIFO</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Named pipe
|
|
||||||
(fifo)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Not all file types are supported
|
|
||||||
by all platforms. The constants used by stat(2) may have
|
|
||||||
different numeric values from the corresponding constants
|
|
||||||
above.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The functions
|
|
||||||
<b>archive_entry_mode</b>() and
|
|
||||||
<b>archive_entry_set_mode</b>() get/set a combination of
|
|
||||||
file type and permissions and provide the equivalent of
|
|
||||||
<i>st_mode</i>. Use of <b>archive_entry_filetype</b>() and
|
|
||||||
<b>archive_entry_perm</b>() for getting and
|
|
||||||
<b>archive_entry_set_filetype</b>() and
|
|
||||||
<b>archive_entry_set_perm</b>() for setting is
|
|
||||||
recommended.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The function
|
|
||||||
<b>archive_entry_size</b>() returns the file size, if it has
|
|
||||||
been set, and 0 otherwise. <b>archive_entry_size</b>() can
|
|
||||||
be used to query that status.
|
|
||||||
<b>archive_entry_set_size</b>() and
|
|
||||||
<b>archive_entry_unset_size</b>() set and unset the size,
|
|
||||||
respectively.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The number of
|
|
||||||
references (hardlinks) can be obtained by calling
|
|
||||||
<b>archive_entry_nlink</b>() and set with
|
|
||||||
<b>archive_entry_set_nlink</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Identifying
|
|
||||||
unique files</b> <br>
|
|
||||||
The functions <b>archive_entry_dev</b>() and
|
|
||||||
<b>archive_entry_ino64</b>() are used by
|
|
||||||
archive_entry_linkify(3) to find hardlinks. The pair of
|
|
||||||
device and inode is supposed to identify hardlinked
|
|
||||||
files.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The device major
|
|
||||||
and minor number can be obtained independently using
|
|
||||||
<b>archive_entry_devmajor</b>() and
|
|
||||||
<b>archive_entry_devminor</b>(). The device can be set
|
|
||||||
either via <b>archive_entry_set_dev</b>() or by the
|
|
||||||
combination of major and minor number using
|
|
||||||
<b>archive_entry_set_devmajor</b>() and
|
|
||||||
<b>archive_entry_set_devminor</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The inode number
|
|
||||||
can be obtained using <b>archive_entry_ino</b>(). This is a
|
|
||||||
legacy interface that uses the platform <i>ino_t</i>, which
|
|
||||||
may be very small. To set the inode number,
|
|
||||||
<b>archive_entry_set_ino64</b>() is the preferred
|
|
||||||
interface.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Accessor
|
|
||||||
functions for block and character devices</b> <br>
|
|
||||||
Block and character devices are characterised either using a
|
|
||||||
device number or a pair of major and minor number. The
|
|
||||||
combined device number can be obtained with
|
|
||||||
<b>archive_device_rdev</b>() and set with
|
|
||||||
<b>archive_device_set_rdev</b>(). The major and minor
|
|
||||||
numbers are accessed by <b>archive_device_rdevmajor</b>(),
|
|
||||||
<b>archive_device_rdevminor</b>()
|
|
||||||
<b>archive_device_set_rdevmajor</b>() and
|
|
||||||
<b>archive_device_set_rdevminor</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">stat(2), archive_entry_acl(3),
|
|
||||||
archive_entry_perms(3), archive_entry_time(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,205 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:21 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_ENTRY_TIME(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_ENTRY_TIME(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_entry_atime</b>,
|
|
||||||
<b>archive_entry_atime_nsec</b>,
|
|
||||||
<b>archive_entry_atime_is_set</b>,
|
|
||||||
<b>archive_entry_set_atime</b>,
|
|
||||||
<b>archive_entry_unset_atime</b>,
|
|
||||||
<b>archive_entry_birthtime</b>,
|
|
||||||
<b>archive_entry_birthtime_nsec</b>,
|
|
||||||
<b>archive_entry_birthtime_is_set</b>,
|
|
||||||
<b>archive_entry_set_birthtime</b>,
|
|
||||||
<b>archive_entry_unset_birthtime</b>,
|
|
||||||
<b>archive_entry_ctime</b>, <b>archive_entry_ctime_nsec</b>,
|
|
||||||
<b>archive_entry_ctime_is_set</b>,
|
|
||||||
<b>archive_entry_set_ctime</b>,
|
|
||||||
<b>archive_entry_unset_ctime</b>,
|
|
||||||
<b>archive_entry_mtime</b>, <b>archive_entry_mtime_nsec</b>,
|
|
||||||
<b>archive_entry_mtime_is_set</b>,
|
|
||||||
<b>archive_entry_set_mtime</b>,
|
|
||||||
<b>archive_entry_unset_mtime</b> — functions for
|
|
||||||
manipulating times in archive entry descriptions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive_entry.h></b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>time_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_atime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>long</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_atime_nsec</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_atime_is_set</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_atime</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>time_t sec</i>, <i>long nanosec</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_unset_atime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>time_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_birthtime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>long</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_birthtime_nsec</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_birthtime_is_set</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_birthtime</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>time_t sec</i>, <i>long nanosec</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_unset_birthtime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>time_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_ctime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>long</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_ctime_nsec</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_ctime_is_set</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_ctime</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>time_t sec</i>, <i>long nanosec</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_unset_ctime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>time_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_mtime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>long</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_mtime_nsec</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_mtime_is_set</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_set_mtime</b>(<i>struct archive_entry *a</i>,
|
|
||||||
<i>time_t sec</i>, <i>long nanosec</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_entry_unset_mtime</b>(<i>struct archive_entry *a</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions create and
|
|
||||||
manipulate the time fields in an <i>archive_entry</i>.
|
|
||||||
Supported time fields are atime (access time), birthtime
|
|
||||||
(creation time), ctime (last time an inode property was
|
|
||||||
changed) and mtime (modification time).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">libarchive(3)
|
|
||||||
provides a high-resolution interface. The timestamps are
|
|
||||||
truncated automatically depending on the archive format (for
|
|
||||||
archiving) or the filesystem capabilities (for
|
|
||||||
restoring).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">All timestamp
|
|
||||||
fields are optional. The <b>XXX_unset</b>() functions can be
|
|
||||||
used to mark the corresponding field as missing. The current
|
|
||||||
state can be queried using <b>XXX_is_set</b>(). Unset time
|
|
||||||
fields have a second and nanosecond field of 0.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle <kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,233 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read</b> —
|
|
||||||
functions for reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Create
|
|
||||||
archive object</b> <br>
|
|
||||||
See archive_read_new(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">To read an
|
|
||||||
archive, you must first obtain an initialized struct archive
|
|
||||||
object from <b>archive_read_new</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Enable
|
|
||||||
filters and formats</b> <br>
|
|
||||||
See archive_read_filter(3) and archive_read_format(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You can then
|
|
||||||
modify this object for the desired operations with the
|
|
||||||
various <b>archive_read_set_XXX</b>() and
|
|
||||||
<b>archive_read_support_XXX</b>() functions. In particular,
|
|
||||||
you will need to invoke appropriate
|
|
||||||
<b>archive_read_support_XXX</b>() functions to enable the
|
|
||||||
corresponding compression 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 <b>archive_read_support_filter_all</b>() and
|
|
||||||
<b>archive_read_support_format_all</b>() to enable
|
|
||||||
auto-detect for all formats and compression types currently
|
|
||||||
supported by the library.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Set
|
|
||||||
options</b> <br>
|
|
||||||
See archive_read_set_options(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Open
|
|
||||||
archive</b> <br>
|
|
||||||
See archive_read_open(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Once you have
|
|
||||||
prepared the struct archive object, you call
|
|
||||||
<b>archive_read_open</b>() to actually open the archive and
|
|
||||||
prepare it for reading. 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, <i>FILE *</i> 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Consume
|
|
||||||
archive</b> <br>
|
|
||||||
See archive_read_header(3), archive_read_data(3) and
|
|
||||||
archive_read_extract(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Each archive
|
|
||||||
entry consists of a header followed by a certain amount of
|
|
||||||
data. You can obtain the next header with
|
|
||||||
<b>archive_read_next_header</b>(), which returns a pointer
|
|
||||||
to an struct archive_entry structure with information 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 <b>archive_read_data</b>() (which works much like the
|
|
||||||
read(2) system call) to read this data from the archive, or
|
|
||||||
<b>archive_read_data_block</b>() which provides a slightly
|
|
||||||
more efficient interface. You may prefer to use the
|
|
||||||
higher-level <b>archive_read_data_skip</b>(), which reads
|
|
||||||
and discards the data for this entry,
|
|
||||||
<b>archive_read_data_into_fd</b>(), which copies the data to
|
|
||||||
the provided file descriptor, or
|
|
||||||
<b>archive_read_extract</b>(), which recreates the specified
|
|
||||||
entry on disk and copies data from the archive. In
|
|
||||||
particular, note that <b>archive_read_extract</b>() 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Release
|
|
||||||
resources</b> <br>
|
|
||||||
See archive_read_free(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Once you have
|
|
||||||
finished reading data from the archive, you should call
|
|
||||||
<b>archive_read_close</b>() to close the archive, then call
|
|
||||||
<b>archive_read_free</b>() to release all resources,
|
|
||||||
including all memory allocated by the library.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>EXAMPLES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The following illustrates basic
|
|
||||||
usage of the library. In this example, the callback
|
|
||||||
functions are simply wrappers around the standard open(2),
|
|
||||||
read(2), and close(2) system calls.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">void <br>
|
|
||||||
list_archive(const char *name) <br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata; <br>
|
|
||||||
struct archive *a; <br>
|
|
||||||
struct archive_entry *entry;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">mydata =
|
|
||||||
malloc(sizeof(struct mydata)); <br>
|
|
||||||
a = archive_read_new(); <br>
|
|
||||||
mydata->name = name; <br>
|
|
||||||
archive_read_support_filter_all(a); <br>
|
|
||||||
archive_read_support_format_all(a); <br>
|
|
||||||
archive_read_open(a, mydata, myopen, myread, myclose); <br>
|
|
||||||
while (archive_read_next_header(a, &entry) ==
|
|
||||||
ARCHIVE_OK) { <br>
|
|
||||||
printf("%s\n",archive_entry_pathname(entry)); <br>
|
|
||||||
archive_read_data_skip(a); <br>
|
|
||||||
} <br>
|
|
||||||
archive_read_free(a); <br>
|
|
||||||
free(mydata); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">la_ssize_t <br>
|
|
||||||
myread(struct archive *a, void *client_data, const void
|
|
||||||
**buff) <br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata = client_data;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">*buff =
|
|
||||||
mydata->buff; <br>
|
|
||||||
return (read(mydata->fd, mydata->buff, 10240)); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">int <br>
|
|
||||||
myopen(struct archive *a, void *client_data) <br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata = client_data;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">mydata->fd =
|
|
||||||
open(mydata->name, O_RDONLY); <br>
|
|
||||||
return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL);
|
|
||||||
<br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">int <br>
|
|
||||||
myclose(struct archive *a, void *client_data) <br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata = client_data;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">if
|
|
||||||
(mydata->fd > 0) <br>
|
|
||||||
close(mydata->fd); <br>
|
|
||||||
return (ARCHIVE_OK); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read_data(3),
|
|
||||||
archive_read_extract(3), archive_read_filter(3),
|
|
||||||
archive_read_format(3), archive_read_header(3),
|
|
||||||
archive_read_new(3), archive_read_open(3),
|
|
||||||
archive_read_set_options(3), archive_util(3), libarchive(3),
|
|
||||||
tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle <kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Many traditional archiver
|
|
||||||
programs treat empty files as valid empty archives. For
|
|
||||||
example, many implementations of tar(1) allow you to append
|
|
||||||
entries to an empty file. Of course, it is impossible to
|
|
||||||
determine the format of an empty file by inspecting the
|
|
||||||
contents, so this library treats empty files as having a
|
|
||||||
special “empty” format.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,82 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_ADD_PASS... BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_ADD_PASS...</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_add_passphrase</b>,
|
|
||||||
<b>archive_read_set_passphrase_callback</b> —
|
|
||||||
functions for reading encrypted archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_add_passphrase</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *passphrase</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_set_passphrase_callback</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>archive_passphrase_callback *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_add_passphrase</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Register passphrases for
|
|
||||||
reading an encryption archive. If <i>passphrase</i> is NULL
|
|
||||||
or empty, this function will do nothing and
|
|
||||||
<b>ARCHIVE_FAILED</b> will be returned. Otherwise,
|
|
||||||
<b>ARCHIVE_OK</b> will be returned.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_set_passphrase_callback</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Register a callback function
|
|
||||||
that will be invoked to get a passphrase for decryption
|
|
||||||
after trying all the passphrases registered by the
|
|
||||||
<b>archive_read_add_passphrase</b>() function failed.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_read_set_options(3), libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
September 14, 2014 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,142 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_DATA(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_DATA(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_data</b>,
|
|
||||||
<b>archive_read_data_block</b>,
|
|
||||||
<b>archive_read_data_skip</b>,
|
|
||||||
<b>archive_read_data_into_fd</b> — functions for
|
|
||||||
reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>la_ssize_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_data</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *buff</i>, <i>size_t len</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_data_block</b>(<i>struct archive *</i>,
|
|
||||||
<i>const void **buff</i>, <i>size_t *len</i>,
|
|
||||||
<i>off_t *offset</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_data_skip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_data_into_fd</b>(<i>struct archive *</i>,
|
|
||||||
<i>int fd</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_data</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Read data associated with the
|
|
||||||
header just read. Internally, this is a convenience function
|
|
||||||
that calls <b>archive_read_data_block</b>() and fills any
|
|
||||||
gaps with nulls so that callers see a single continuous
|
|
||||||
stream of data.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_data_block</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Return the next available block
|
|
||||||
of data for this entry. Unlike <b>archive_read_data</b>(),
|
|
||||||
the <b>archive_read_data_block</b>() function avoids copying
|
|
||||||
data and allows you to correctly handle sparse files, as
|
|
||||||
supported by some archive formats. The library guarantees
|
|
||||||
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.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_data_skip</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A convenience function that
|
|
||||||
repeatedly calls <b>archive_read_data_block</b>() to skip
|
|
||||||
all of the data for this archive entry. Note that this
|
|
||||||
function is invoked automatically by
|
|
||||||
<b>archive_read_next_header2</b>() if the previous entry was
|
|
||||||
not completely consumed.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_data_into_fd</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A convenience function that
|
|
||||||
repeatedly calls <b>archive_read_data_block</b>() to copy
|
|
||||||
the entire entry to the provided file descriptor.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Most functions return zero on
|
|
||||||
success, non-zero on error. The possible return codes
|
|
||||||
include: <b>ARCHIVE_OK</b> (the operation succeeded),
|
|
||||||
<b>ARCHIVE_WARN</b> (the operation succeeded but a
|
|
||||||
non-critical error was encountered), <b>ARCHIVE_EOF</b>
|
|
||||||
(end-of-archive was encountered), <b>ARCHIVE_RETRY</b> (the
|
|
||||||
operation failed but can be retried), and
|
|
||||||
<b>ARCHIVE_FATAL</b> (there was a fatal error; the archive
|
|
||||||
should be closed immediately).</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_data</b>()
|
|
||||||
returns a count of bytes actually read or zero at the end of
|
|
||||||
the entry. On error, a value of <b>ARCHIVE_FATAL</b>,
|
|
||||||
<b>ARCHIVE_WARN</b>, or <b>ARCHIVE_RETRY</b> is
|
|
||||||
returned.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_read_extract(3), archive_read_filter(3),
|
|
||||||
archive_read_format(3), archive_read_header(3),
|
|
||||||
archive_read_open(3), archive_read_set_options(3),
|
|
||||||
archive_util(3), libarchive(3), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,518 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_DISK(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_DISK(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_disk_new</b>,
|
|
||||||
<b>archive_read_disk_open</b>,
|
|
||||||
<b>archive_read_disk_open_w</b>,
|
|
||||||
<b>archive_read_disk_set_behavior</b>,
|
|
||||||
<b>archive_read_disk_set_symlink_logical</b>,
|
|
||||||
<b>archive_read_disk_set_symlink_physical</b>,
|
|
||||||
<b>archive_read_disk_set_symlink_hybrid</b>,
|
|
||||||
<b>archive_read_disk_entry_from_file</b>,
|
|
||||||
<b>archive_read_disk_gname</b>,
|
|
||||||
<b>archive_read_disk_uname</b>,
|
|
||||||
<b>archive_read_disk_set_uname_lookup</b>,
|
|
||||||
<b>archive_read_disk_set_gname_lookup</b>,
|
|
||||||
<b>archive_read_disk_set_standard_lookup</b>,
|
|
||||||
<b>archive_read_disk_descend</b>,
|
|
||||||
<b>archive_read_disk_can_descend</b>,
|
|
||||||
<b>archive_read_disk_current_filesystem</b>,
|
|
||||||
<b>archive_read_disk_current_filesystem_is_synthetic</b>,
|
|
||||||
<b>archive_read_disk_current_filesystem_is_remote</b>,
|
|
||||||
<b>archive_read_disk_set_matching</b>,
|
|
||||||
<b>archive_read_disk_set_metadata_filter_callback</b>,
|
|
||||||
— functions for reading objects from disk</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_new</b>(<i>void</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_open</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_open_w</b>(<i>struct archive *</i>,
|
|
||||||
<i>const wchar_t *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_set_behavior</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_logical</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_physical</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_set_symlink_hybrid</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_gname</b>(<i>struct archive *</i>,
|
|
||||||
<i>gid_t</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_uname</b>(<i>struct archive *</i>,
|
|
||||||
<i>uid_t</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_disk_set_gname_lookup</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *</i>,
|
|
||||||
<i>const char *(*lookup)(void *, gid_t)</i>,
|
|
||||||
<i>void (*cleanup)(void *)</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_disk_set_uname_lookup</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *</i>,
|
|
||||||
<i>const char *(*lookup)(void *, uid_t)</i>,
|
|
||||||
<i>void (*cleanup)(void *)</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_set_standard_lookup</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_disk_entry_from_file</b>(<i>struct archive *</i>,
|
|
||||||
<i>struct archive_entry *</i>, <i>int fd</i>,
|
|
||||||
<i>const struct stat *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_descend</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_can_descend</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_synthetic</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_disk_current_filesystem_is_remote</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_disk_set_matching</b>(<i>struct archive *</i>,
|
|
||||||
<i>struct archive *</i>,
|
|
||||||
<i>void (*excluded_func)(struct archive *, void *, struct archive entry *)</i>,
|
|
||||||
<i>void *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_disk_set_metadata_filter_callback</b>(<i>struct archive *</i>,
|
|
||||||
<i>int (*metadata_filter_func)(struct archive *, void*, struct archive_entry *)</i>,
|
|
||||||
<i>void *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions provide an API
|
|
||||||
for reading information about objects on disk. In
|
|
||||||
particular, they provide an interface for populating struct
|
|
||||||
archive_entry objects.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_new</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Allocates and initializes a
|
|
||||||
struct archive object suitable for reading object
|
|
||||||
information from disk.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_open</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Opens the file or directory
|
|
||||||
from the given path and prepares the struct archive to read
|
|
||||||
it from disk.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_open_w</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Opens the file or directory
|
|
||||||
from the given path as a wide character string and prepares
|
|
||||||
the struct archive to read it from disk.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_set_behavior</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Configures various behavior
|
|
||||||
options when reading entries from disk. The flags field
|
|
||||||
consists of a bitwise OR of one or more of the following
|
|
||||||
values:</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_HONOR_NODUMP</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Skip files and directories with
|
|
||||||
the nodump file attribute (file flag) set. By default, the
|
|
||||||
nodump file attribute is ignored.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_MAC_COPYFILE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Mac OS X specific. Read
|
|
||||||
metadata (ACLs and extended attributes) with copyfile(3). By
|
|
||||||
default, metadata is read using copyfile(3).</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_NO_ACL</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Do not read Access Control
|
|
||||||
Lists. By default, ACLs are read from disk.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_NO_FFLAGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Do not traverse mount points.
|
|
||||||
By default, mount points are traversed.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_NO_XATTR</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_RESTORE_ATIME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Restore access time of
|
|
||||||
traversed files. By default, access time of traversed files
|
|
||||||
is not restored.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_READDISK_NO_SPARSE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Do not read sparse file
|
|
||||||
information. By default, sparse file information is read
|
|
||||||
from disk.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_set_symlink_logical</b>(),
|
|
||||||
<b>archive_read_disk_set_symlink_physical</b>(),
|
|
||||||
<b>archive_read_disk_set_symlink_hybrid</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This sets the mode used for
|
|
||||||
handling symbolic links. The “logical” mode
|
|
||||||
follows all symbolic links. The “physical” mode
|
|
||||||
does not follow any symbolic links. The “hybrid”
|
|
||||||
mode currently behaves identically to the
|
|
||||||
“logical” mode.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_gname</b>(),
|
|
||||||
<b>archive_read_disk_uname</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns a user or group name
|
|
||||||
given a gid or uid value. By default, these always return a
|
|
||||||
NULL string.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_set_gname_lookup</b>(),
|
|
||||||
<b>archive_read_disk_set_uname_lookup</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_set_standard_lookup</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This convenience function
|
|
||||||
installs a standard set of user and group name lookup
|
|
||||||
functions. These functions use getpwuid(3) and getgrgid(3)
|
|
||||||
to convert ids to names, defaulting to NULL if the names
|
|
||||||
cannot be looked up. These functions also implement a simple
|
|
||||||
memory cache to reduce the number of calls to getpwuid(3)
|
|
||||||
and getgrgid(3).</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_entry_from_file</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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 path or path fields must already be set. (If both are
|
|
||||||
set, the source path will be used.)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Information is
|
|
||||||
read from disk using the path name from the struct
|
|
||||||
archive_entry object. If a file descriptor is provided, some
|
|
||||||
information will be obtained using that file descriptor, on
|
|
||||||
platforms that support the appropriate system calls.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">If a pointer to
|
|
||||||
a struct stat is provided, information from that structure
|
|
||||||
will be used instead of reading from the disk where
|
|
||||||
appropriate. This can provide performance benefits in
|
|
||||||
scenarios where struct stat information has already been
|
|
||||||
read from the disk as a side effect of some other operation.
|
|
||||||
(For example, directory traversal libraries often provide
|
|
||||||
this information.)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Where
|
|
||||||
necessary, user and group ids are converted to user and
|
|
||||||
group names using the currently-registered lookup functions
|
|
||||||
above. This affects the file ownership fields and ACL values
|
|
||||||
in the struct archive_entry object.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_descend</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">If the current entry can be
|
|
||||||
descended, this function will mark the directory as the next
|
|
||||||
entry for archive_read_header(3) to visit.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_can_descend</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns 1 if the current entry
|
|
||||||
is an unvisited directory and 0 otherwise.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns the index of the most
|
|
||||||
recent filesystem entry that has been visited through
|
|
||||||
archive_read_disk</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_synthetic</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns 1 if the current
|
|
||||||
filesystem is a virtual filesystem. Returns 0 if the current
|
|
||||||
filesystem is not a virtual filesystem. Returns -1 if it is
|
|
||||||
unknown.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_current_filesystem_is_remote</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns 1 if the current
|
|
||||||
filesystem is a remote filesystem. Returns 0 if the current
|
|
||||||
filesystem is not a remote filesystem. Returns -1 if it is
|
|
||||||
unknown.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_set_matching</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Allows the caller to set struct
|
|
||||||
archive *_ma to compare each entry during
|
|
||||||
archive_read_header(3) calls. If matched based on calls to
|
|
||||||
archive_match_path_excluded, archive_match_time_excluded, or
|
|
||||||
archive_match_owner_excluded, then the callback function
|
|
||||||
specified by the _excluded_func parameter will execute. This
|
|
||||||
function will recieve data provided to the fourth parameter,
|
|
||||||
void *_client_data.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_disk_set_metadata_filter_callback</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Allows the caller to set a
|
|
||||||
callback function during calls to archive_read_header(3) to
|
|
||||||
filter out metadata for each entry. The callback function
|
|
||||||
recieves the struct archive object, void* custom filter
|
|
||||||
data, and the struct archive_entry. If the callback function
|
|
||||||
returns an error, ARCHIVE_RETRY will be returned and the
|
|
||||||
entry will not be further processed.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">More information about the
|
|
||||||
<i>struct archive</i> object and the overall design of the
|
|
||||||
library can be found in the libarchive(3) overview.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>EXAMPLES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The following illustrates basic
|
|
||||||
usage of the library by showing how to use it to copy an
|
|
||||||
item on disk into an archive.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">void <br>
|
|
||||||
file_to_archive(struct archive *a, const char *name) <br>
|
|
||||||
{ <br>
|
|
||||||
char buff[8192]; <br>
|
|
||||||
size_t bytes_read; <br>
|
|
||||||
struct archive *ard; <br>
|
|
||||||
struct archive_entry *entry; <br>
|
|
||||||
int fd;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">ard =
|
|
||||||
archive_read_disk_new(); <br>
|
|
||||||
archive_read_disk_set_standard_lookup(ard); <br>
|
|
||||||
entry = archive_entry_new(); <br>
|
|
||||||
fd = open(name, O_RDONLY); <br>
|
|
||||||
if (fd < 0) <br>
|
|
||||||
return; <br>
|
|
||||||
archive_entry_copy_pathname(entry, name); <br>
|
|
||||||
archive_read_disk_entry_from_file(ard, entry, fd, NULL);
|
|
||||||
<br>
|
|
||||||
archive_write_header(a, entry); <br>
|
|
||||||
while ((bytes_read = read(fd, buff, sizeof(buff))) > 0)
|
|
||||||
<br>
|
|
||||||
archive_write_data(a, buff, bytes_read); <br>
|
|
||||||
archive_write_finish_entry(a); <br>
|
|
||||||
archive_read_free(ard); <br>
|
|
||||||
archive_entry_free(entry); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Most functions return
|
|
||||||
<b>ARCHIVE_OK</b> (zero) on success, or one of several
|
|
||||||
negative error codes for errors. Specific error codes
|
|
||||||
include: <b>ARCHIVE_RETRY</b> for operations that might
|
|
||||||
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
|
|
||||||
conditions that do not prevent further operations, and
|
|
||||||
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
|
|
||||||
operations impossible.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_disk_new</b>()
|
|
||||||
returns a pointer to a newly-allocated struct archive object
|
|
||||||
or NULL if the allocation failed for any reason.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_disk_gname</b>()
|
|
||||||
and <b>archive_read_disk_uname</b>() return const char *
|
|
||||||
pointers to the textual name or NULL if the lookup failed
|
|
||||||
for any reason. 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_util(3), archive_write(3), archive_write_disk(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3. The
|
|
||||||
<b>archive_read_disk</b> interface was added to
|
|
||||||
<b>libarchive 2.6</b> and first appeared in
|
|
||||||
FreeBSD 8.0.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle
|
|
||||||
<kientzle@FreeBSD.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The “standard” user
|
|
||||||
name and group name lookup functions are not the defaults
|
|
||||||
because getgrgid(3) and getpwuid(3) are sometimes too large
|
|
||||||
for particular applications. The current design allows the
|
|
||||||
application author to use a more compact implementation when
|
|
||||||
appropriate.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The full list of
|
|
||||||
metadata read from disk by
|
|
||||||
<b>archive_read_disk_entry_from_file</b>() is necessarily
|
|
||||||
system-dependent.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The
|
|
||||||
<b>archive_read_disk_entry_from_file</b>() function reads as
|
|
||||||
much information 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">This API should
|
|
||||||
provide a set of methods for walking a directory tree. That
|
|
||||||
would make it a direct parallel of the archive_read(3) API.
|
|
||||||
When such methods are implemented, the “hybrid”
|
|
||||||
symbolic link mode will make sense.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
April 3, 2017 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,134 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_EXTRACT(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_EXTRACT(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_extract</b>,
|
|
||||||
<b>archive_read_extract2</b>,
|
|
||||||
<b>archive_read_extract_set_progress_callback</b> —
|
|
||||||
functions for reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_extract</b>(<i>struct archive *</i>,
|
|
||||||
<i>struct archive_entry *</i>,
|
|
||||||
<i>int flags</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_extract2</b>(<i>struct archive *src</i>,
|
|
||||||
<i>struct archive_entry *</i>,
|
|
||||||
<i>struct archive *dest</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_extract_set_progress_callback</b>(<i>struct archive *</i>,
|
|
||||||
<i>void (*func)(void *)</i>,
|
|
||||||
<i>void *user_data</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_extract</b>(),
|
|
||||||
<b>archive_read_extract_set_skip_file</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A convenience function that
|
|
||||||
wraps the corresponding archive_write_disk(3) interfaces.
|
|
||||||
The first call to <b>archive_read_extract</b>() 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 <i>flags</i> argument is passed
|
|
||||||
unmodified to archive_write_disk_set_options(3).</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_extract2</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This is another version of
|
|
||||||
<b>archive_read_extract</b>() 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
|
|
||||||
<b>archive_read_extract2</b>() does not accept a
|
|
||||||
<i>flags</i> argument; you should use
|
|
||||||
<b>archive_write_disk_set_options</b>() to set the restore
|
|
||||||
options yourself.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_extract_set_progress_callback</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Sets a pointer to a
|
|
||||||
user-defined callback that can be used for updating progress
|
|
||||||
displays during extraction. The progress function will be
|
|
||||||
invoked during the extraction of large regular files. The
|
|
||||||
progress function will be invoked with the pointer provided
|
|
||||||
to this call. Generally, the data pointed to should include
|
|
||||||
a reference to the archive object and the archive_entry
|
|
||||||
object so that various statistics can be retrieved for the
|
|
||||||
progress display.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Most functions return zero on
|
|
||||||
success, non-zero on error. The possible return codes
|
|
||||||
include: <b>ARCHIVE_OK</b> (the operation succeeded),
|
|
||||||
<b>ARCHIVE_WARN</b> (the operation succeeded but a
|
|
||||||
non-critical error was encountered), <b>ARCHIVE_EOF</b>
|
|
||||||
(end-of-archive was encountered), <b>ARCHIVE_RETRY</b> (the
|
|
||||||
operation failed but can be retried), and
|
|
||||||
<b>ARCHIVE_FATAL</b> (there was a fatal error; the archive
|
|
||||||
should be closed immediately).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_read_data(3), archive_read_filter(3),
|
|
||||||
archive_read_format(3), archive_read_open(3),
|
|
||||||
archive_read_set_options(3), archive_util(3), libarchive(3),
|
|
||||||
tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,223 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_FILTER(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_FILTER(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_support_filter_all</b>,
|
|
||||||
<b>archive_read_support_filter_bzip2</b>,
|
|
||||||
<b>archive_read_support_filter_compress</b>,
|
|
||||||
<b>archive_read_support_filter_gzip</b>,
|
|
||||||
<b>archive_read_support_filter_lz4</b>,
|
|
||||||
<b>archive_read_support_filter_lzma</b>,
|
|
||||||
<b>archive_read_support_filter_none</b>,
|
|
||||||
<b>archive_read_support_filter_rpm</b>,
|
|
||||||
<b>archive_read_support_filter_uu</b>,
|
|
||||||
<b>archive_read_support_filter_xz</b>,
|
|
||||||
<b>archive_read_support_filter_zstd</b>,
|
|
||||||
<b>archive_read_support_filter_program</b>,
|
|
||||||
<b>archive_read_support_filter_program_signature</b> —
|
|
||||||
functions for reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_all</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_by_code</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_bzip2</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_compress</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_grzip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_gzip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_lrzip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_lz4</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_lzma</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_lzop</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_none</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_rpm</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_uu</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_xz</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_filter_zstd</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_support_filter_program</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *cmd</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_support_filter_program_signature</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *cmd</i>,
|
|
||||||
<i>const void *signature</i>,
|
|
||||||
<i>size_t signature_length</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_support_filter_bzip2</b>(),
|
|
||||||
<b>archive_read_support_filter_compress</b>(),
|
|
||||||
<b>archive_read_support_filter_grzip</b>(),
|
|
||||||
<b>archive_read_support_filter_gzip</b>(),
|
|
||||||
<b>archive_read_support_filter_lrzip</b>(),
|
|
||||||
<b>archive_read_support_filter_lz4</b>(),
|
|
||||||
<b>archive_read_support_filter_lzma</b>(),
|
|
||||||
<b>archive_read_support_filter_lzop</b>(),
|
|
||||||
<b>archive_read_support_filter_none</b>(),
|
|
||||||
<b>archive_read_support_filter_rpm</b>(),
|
|
||||||
<b>archive_read_support_filter_uu</b>(),
|
|
||||||
<b>archive_read_support_filter_xz</b>(),
|
|
||||||
<b>archive_read_support_filter_zstd</b>(),</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_support_filter_all</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Enables all available
|
|
||||||
decompression filters.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_support_filter_by_code</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Enables a single filter
|
|
||||||
specified by the filter code. This function does not work
|
|
||||||
with <b>ARCHIVE_FILTER_PROGRAM</b>. Note: In
|
|
||||||
statically-linked executables, this will cause your program
|
|
||||||
to include support for every filter. If executable size is a
|
|
||||||
concern, you may wish to avoid using this function.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_support_filter_program</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Data is fed through the
|
|
||||||
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 conjunction
|
|
||||||
with any other decompression option.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_support_filter_program_signature</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This feeds data through the
|
|
||||||
specified external program but only if the initial bytes of
|
|
||||||
the data match the specified signature value.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> if the compression is fully supported,
|
|
||||||
<b>ARCHIVE_WARN</b> if the compression is supported only
|
|
||||||
through an external program.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_support_filter_none</b>()
|
|
||||||
always succeeds.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_read(3),
|
|
||||||
archive_read_data(3), archive_read_format(3),
|
|
||||||
archive_read_format(3), libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD June 9,
|
|
||||||
2020 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,225 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_FORMAT(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_FORMAT(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_support_format_7zip</b>,
|
|
||||||
<b>archive_read_support_format_all</b>,
|
|
||||||
<b>archive_read_support_format_ar</b>,
|
|
||||||
<b>archive_read_support_format_by_code</b>,
|
|
||||||
<b>archive_read_support_format_cab</b>,
|
|
||||||
<b>archive_read_support_format_cpio</b>,
|
|
||||||
<b>archive_read_support_format_empty</b>,
|
|
||||||
<b>archive_read_support_format_iso9660</b>,
|
|
||||||
<b>archive_read_support_format_lha</b>,
|
|
||||||
<b>archive_read_support_format_mtree</b>,
|
|
||||||
<b>archive_read_support_format_rar</b>,
|
|
||||||
<b>archive_read_support_format_raw</b>,
|
|
||||||
<b>archive_read_support_format_tar</b>,
|
|
||||||
<b>archive_read_support_format_xar</b>,
|
|
||||||
<b>archive_read_support_format_zip</b> — functions for
|
|
||||||
reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_7zip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_all</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_ar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_by_code</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_cab</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_cpio</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_empty</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_iso9660</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_lha</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_mtree</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_rar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_raw</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_tar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_xar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_support_format_zip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_support_format_7zip</b>(),
|
|
||||||
<b>archive_read_support_format_ar</b>(),
|
|
||||||
<b>archive_read_support_format_cab</b>(),
|
|
||||||
<b>archive_read_support_format_cpio</b>(),
|
|
||||||
<b>archive_read_support_format_iso9660</b>(),
|
|
||||||
<b>archive_read_support_format_lha</b>(),
|
|
||||||
<b>archive_read_support_format_mtree</b>(),
|
|
||||||
<b>archive_read_support_format_rar</b>(),
|
|
||||||
<b>archive_read_support_format_raw</b>(),
|
|
||||||
<b>archive_read_support_format_tar</b>(),
|
|
||||||
<b>archive_read_support_format_xar</b>(),
|
|
||||||
<b>archive_read_support_format_zip</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Enables support---including
|
|
||||||
auto-detection code---for the specified archive format. For
|
|
||||||
example, <b>archive_read_support_format_tar</b>() enables
|
|
||||||
support for a variety of standard tar formats, old-style
|
|
||||||
tar, ustar, pax interchange format, and many common
|
|
||||||
variants.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_support_format_all</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Enables support for all
|
|
||||||
available formats except the “raw” format (see
|
|
||||||
below).</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_support_format_by_code</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Enables a single format
|
|
||||||
specified by the format code. This can be useful when
|
|
||||||
reading a single archive twice; use <b>archive_format</b>()
|
|
||||||
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 executables, this
|
|
||||||
will cause your program to include support for every format.
|
|
||||||
If executable size is a concern, you may wish to avoid using
|
|
||||||
this function.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_support_format_empty</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_support_format_raw</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The “raw” format
|
|
||||||
handler allows libarchive to be used to read arbitrary data.
|
|
||||||
It treats any data stream as an archive with a single entry.
|
|
||||||
The pathname of this entry is “data”; all other
|
|
||||||
entry fields are unset. This is not enabled by
|
|
||||||
<b>archive_read_support_format_all</b>() in order to avoid
|
|
||||||
erroneous handling of damaged archives.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read_data(3),
|
|
||||||
archive_read_filter(3), archive_read_set_options(3),
|
|
||||||
archive_util(3), libarchive(3), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Many traditional archiver
|
|
||||||
programs treat empty files as valid empty archives. For
|
|
||||||
example, many implementations of tar(1) allow you to append
|
|
||||||
entries to an empty file. Of course, it is impossible to
|
|
||||||
determine the format of an empty file by inspecting the
|
|
||||||
contents, so this library treats empty files as having a
|
|
||||||
special “empty” format.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Using the
|
|
||||||
“raw” handler together with any other handler
|
|
||||||
will often work but can produce surprising results.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,107 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_FREE(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_FREE(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_close</b>,
|
|
||||||
<b>archive_read_finish</b>, <b>archive_read_free</b> —
|
|
||||||
functions for reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_close</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_finish</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_free</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_close</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Complete the archive and invoke
|
|
||||||
the close callback.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_finish</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This is a deprecated synonym
|
|
||||||
for <b>archive_read_free</b>(). The new name was introduced
|
|
||||||
with libarchive 3.0. Applications that need to compile with
|
|
||||||
either libarchive 2 or libarchive 3 should continue to use
|
|
||||||
the <b>archive_read_finish</b>() name. Both names will be
|
|
||||||
supported until libarchive 4.0 is released, which is not
|
|
||||||
expected to occur earlier than 2013.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_free</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Invokes
|
|
||||||
<b>archive_read_close</b>() if it was not invoked manually,
|
|
||||||
then release all resources. Note: In libarchive 1.x, this
|
|
||||||
function was declared to return <i>void</i>, which made it
|
|
||||||
impossible to detect certain errors when
|
|
||||||
<b>archive_read_close</b>() was invoked implicitly from this
|
|
||||||
function. The declaration is corrected beginning with
|
|
||||||
libarchive 2.0.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_read_data(3),
|
|
||||||
archive_read_filter(3), archive_read_format(3),
|
|
||||||
archive_read_new(3), archive_read_open(3),
|
|
||||||
archive_read_set_options(3), archive_util(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,98 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_HEADER(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_HEADER(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_next_header</b>,
|
|
||||||
<b>archive_read_next_header2</b> — functions for
|
|
||||||
reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_next_header</b>(<i>struct archive *</i>,
|
|
||||||
<i>struct archive_entry **</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_next_header2</b>(<i>struct archive *</i>,
|
|
||||||
<i>struct archive_entry *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_next_header</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Read the header for the next
|
|
||||||
entry and return a pointer to a struct archive_entry. This
|
|
||||||
is a convenience wrapper around
|
|
||||||
<b>archive_read_next_header2</b>() that reuses an internal
|
|
||||||
struct archive_entry object for each request.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_next_header2</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Read the header for the next
|
|
||||||
entry and populate the provided struct archive_entry.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> (the operation succeeded),
|
|
||||||
<b>ARCHIVE_WARN</b> (the operation succeeded but a
|
|
||||||
non-critical error was encountered), <b>ARCHIVE_EOF</b>
|
|
||||||
(end-of-archive was encountered), <b>ARCHIVE_RETRY</b> (the
|
|
||||||
operation failed but can be retried), and
|
|
||||||
<b>ARCHIVE_FATAL</b> (there was a fatal error; the archive
|
|
||||||
should be closed immediately).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_read_data(3), archive_read_extract(3),
|
|
||||||
archive_read_filter(3), archive_read_format(3),
|
|
||||||
archive_read_open(3), archive_read_set_options(3),
|
|
||||||
archive_util(3), libarchive(3), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,68 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_NEW(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_NEW(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_new</b> —
|
|
||||||
functions for reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_new</b>(<i>void</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Allocates and initializes a
|
|
||||||
struct archive object suitable for reading from an archive.
|
|
||||||
NULL is returned on error.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">A complete
|
|
||||||
description of the struct archive object can be found in the
|
|
||||||
overview manual page for libarchive(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read_data(3),
|
|
||||||
archive_read_filter(3), archive_read_format(3),
|
|
||||||
archive_read_set_options(3), archive_util(3), libarchive(3),
|
|
||||||
tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,240 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_OPEN(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_OPEN(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_open</b>,
|
|
||||||
<b>archive_read_open2</b>, <b>archive_read_open_fd</b>,
|
|
||||||
<b>archive_read_open_FILE</b>,
|
|
||||||
<b>archive_read_open_filename</b>,
|
|
||||||
<b>archive_read_open_memory</b> — functions for
|
|
||||||
reading streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_open</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>archive_open_callback *</i>,
|
|
||||||
<i>archive_read_callback *</i>,
|
|
||||||
<i>archive_close_callback *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_open2</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>archive_open_callback *</i>,
|
|
||||||
<i>archive_read_callback *</i>,
|
|
||||||
<i>archive_skip_callback *</i>,
|
|
||||||
<i>archive_close_callback *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_open_FILE</b>(<i>struct archive *</i>,
|
|
||||||
<i>FILE *file</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_open_fd</b>(<i>struct archive *</i>,
|
|
||||||
<i>int fd</i>, <i>size_t block_size</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_open_filename</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *filename</i>,
|
|
||||||
<i>size_t block_size</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_read_open_memory</b>(<i>struct archive *</i>,
|
|
||||||
<i>const void *buff</i>,
|
|
||||||
<i>size_t size</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_read_open</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The same as
|
|
||||||
<b>archive_read_open2</b>(), except that the skip callback
|
|
||||||
is assumed to be NULL.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_open2</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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
|
|
||||||
<b>archive_read_open_filename</b>(),
|
|
||||||
<b>archive_read_open_FILE</b>(),
|
|
||||||
<b>archive_read_open_fd</b>(), or
|
|
||||||
<b>archive_read_open_memory</b>() instead. The library
|
|
||||||
invokes the client-provided functions to obtain raw bytes
|
|
||||||
from the archive.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_open_FILE</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Like
|
|
||||||
<b>archive_read_open</b>(), except that it accepts a <i>FILE
|
|
||||||
*</i> pointer. This function should not be used with tape
|
|
||||||
drives or other devices that require strict I/O
|
|
||||||
blocking.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_open_fd</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Like
|
|
||||||
<b>archive_read_open</b>(), except that it accepts a file
|
|
||||||
descriptor 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.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_open_file</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This is a deprecated synonym
|
|
||||||
for <b>archive_read_open_filename</b>().</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_open_filename</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Like
|
|
||||||
<b>archive_read_open</b>(), except that it accepts a simple
|
|
||||||
filename and a block size. A NULL filename represents
|
|
||||||
standard input. This function is safe for use with tape
|
|
||||||
drives or other blocked devices.</p>
|
|
||||||
|
|
||||||
<p><b>archive_read_open_memory</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Like
|
|
||||||
<b>archive_read_open</b>(), except that it accepts a pointer
|
|
||||||
and size of a block of memory containing the archive
|
|
||||||
data.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">A complete
|
|
||||||
description of the struct archive and struct archive_entry
|
|
||||||
objects can be found in the overview manual page for
|
|
||||||
libarchive(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>CLIENT CALLBACKS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The callback functions must
|
|
||||||
match the following prototypes:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
la_ssize_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_callback</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>const void **buffer</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
la_int64_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_skip_callback</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>off_t request</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
int</i> <b>archive_open_callback</b>(<i>struct archive
|
|
||||||
*</i>, <i>void *client_data</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
int</i> <b>archive_close_callback</b>(<i>struct archive
|
|
||||||
*</i>, <i>void *client_data</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The open
|
|
||||||
callback is invoked by <b>archive_open</b>(). It should
|
|
||||||
return <b>ARCHIVE_OK</b> if the underlying file or data
|
|
||||||
source is successfully opened. If the open fails, it should
|
|
||||||
call <b>archive_set_error</b>() to register an error code
|
|
||||||
and message and return <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">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 const void **buffer argument to point to the
|
|
||||||
available data, and return a count of the number of bytes
|
|
||||||
available. The library will invoke the read 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 <b>archive_set_error</b>()
|
|
||||||
to register an error code and message and return -1.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The skip
|
|
||||||
callback is invoked when the library wants to ignore a block
|
|
||||||
of data. The return value is the number of bytes actually
|
|
||||||
skipped, which may differ from the request. If the callback
|
|
||||||
cannot skip data, it should return zero. If the skip
|
|
||||||
callback is not provided (the function pointer is NULL ),
|
|
||||||
the library will invoke the read function instead and simply
|
|
||||||
discard the result. A skip callback can provide significant
|
|
||||||
performance gains when reading uncompressed archives from
|
|
||||||
slow disk drives or other media that can skip quickly.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The close
|
|
||||||
callback is invoked by archive_close when the archive
|
|
||||||
processing is complete. The callback should return
|
|
||||||
<b>ARCHIVE_OK</b> on success. On failure, the callback
|
|
||||||
should invoke <b>archive_set_error</b>() to register an
|
|
||||||
error code and message and return <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_read_data(3), archive_read_filter(3),
|
|
||||||
archive_read_format(3), archive_read_set_options(3),
|
|
||||||
archive_util(3), libarchive(3), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,266 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_READ_OPTIONS(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_READ_OPTIONS(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_read_set_filter_option</b>,
|
|
||||||
<b>archive_read_set_format_option</b>,
|
|
||||||
<b>archive_read_set_option</b>,
|
|
||||||
<b>archive_read_set_options</b> — functions
|
|
||||||
controlling options for reading archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_set_filter_option</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *module</i>,
|
|
||||||
<i>const char *option</i>,
|
|
||||||
<i>const char *value</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_set_format_option</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *module</i>,
|
|
||||||
<i>const char *option</i>,
|
|
||||||
<i>const char *value</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_set_option</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *module</i>,
|
|
||||||
<i>const char *option</i>,
|
|
||||||
<i>const char *value</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_read_set_options</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *options</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions provide a way
|
|
||||||
for libarchive clients to configure specific read
|
|
||||||
modules.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_set_filter_option</b>(),
|
|
||||||
<b>archive_read_set_format_option</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Specifies an option that will
|
|
||||||
be passed to currently-registered filters (including
|
|
||||||
decompression filters) or format readers.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">If
|
|
||||||
<i>option</i> and <i>value</i> are both NULL, these
|
|
||||||
functions will do nothing and <b>ARCHIVE_OK</b> will be
|
|
||||||
returned. If <i>option</i> is NULL but <i>value</i> is not,
|
|
||||||
these functions will do nothing and <b>ARCHIVE_FAILED</b>
|
|
||||||
will be returned.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">If
|
|
||||||
<i>module</i> is not NULL, <i>option</i> and <i>value</i>
|
|
||||||
will be provided to the filter or reader named
|
|
||||||
<i>module</i>. The return value will be that of the module.
|
|
||||||
If there is no such module, <b>ARCHIVE_FAILED</b> will be
|
|
||||||
returned.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">If
|
|
||||||
<i>module</i> is NULL, <i>option</i> and <i>value</i> will
|
|
||||||
be provided to every registered module. If any module
|
|
||||||
returns <b>ARCHIVE_FATAL</b>, this value will be returned
|
|
||||||
immediately. Otherwise, <b>ARCHIVE_OK</b> will be returned
|
|
||||||
if any module accepts the option, and <b>ARCHIVE_FAILED</b>
|
|
||||||
in all other cases.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_set_option</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Calls
|
|
||||||
<b>archive_read_set_format_option</b>(), then
|
|
||||||
<b>archive_read_set_filter_option</b>(). If either function
|
|
||||||
returns <b>ARCHIVE_FATAL</b>, <b>ARCHIVE_FATAL</b> will be
|
|
||||||
returned immediately. Otherwise, greater of the two values
|
|
||||||
will be returned.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_set_options</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;"><i>options</i> is a
|
|
||||||
comma-separated list of options. If <i>options</i> is NULL
|
|
||||||
or empty, <b>ARCHIVE_OK</b> will be returned
|
|
||||||
immediately.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Calls
|
|
||||||
<b>archive_read_set_option</b>() with each option in turn.
|
|
||||||
If any <b>archive_read_set_option</b>() call returns
|
|
||||||
<b>ARCHIVE_FATAL</b>, <b>ARCHIVE_FATAL</b> will be returned
|
|
||||||
immediately.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Individual
|
|
||||||
options have one of the following forms:</p>
|
|
||||||
|
|
||||||
<p><i>option=value</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The option/value pair will be
|
|
||||||
provided to every module. Modules that do not accept an
|
|
||||||
option with this name will ignore it.</p>
|
|
||||||
|
|
||||||
<p><i>option</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">The option will
|
|
||||||
be provided to every module with a value of
|
|
||||||
“1”.</p>
|
|
||||||
|
|
||||||
<p><i>!option</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The option will be provided to
|
|
||||||
every module with a NULL value.</p>
|
|
||||||
|
|
||||||
<p><i>module:option=value</i>, <i>module:option</i>,
|
|
||||||
<i>module:!option</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">As above, but the corresponding
|
|
||||||
option and value will be provided only to modules whose name
|
|
||||||
matches <i>module</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>OPTIONS</b> <br>
|
|
||||||
Format cab <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p>Format cpio <b><br>
|
|
||||||
compat-2x</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Libarchive 2.x incorrectly
|
|
||||||
encoded Unicode filenames on some platforms. This option
|
|
||||||
mimics the libarchive 2.x filename handling so that such
|
|
||||||
archives can be read correctly.</p>
|
|
||||||
|
|
||||||
<p><b>hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p><b>pwb</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">When reading a
|
|
||||||
binary CPIO archive, assume that it is in the original PWB
|
|
||||||
cpio format, and handle file mode bits accordingly. The
|
|
||||||
default is to assume v7 format.</p>
|
|
||||||
|
|
||||||
<p>Format iso9660 <b><br>
|
|
||||||
joliet</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">Support Joliet
|
|
||||||
extensions. Defaults to enabled, use <b>!joliet</b> to
|
|
||||||
disable.</p>
|
|
||||||
|
|
||||||
<p><b>rockridge</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Support RockRidge extensions.
|
|
||||||
Defaults to enabled, use <b>!rockridge</b> to disable.</p>
|
|
||||||
|
|
||||||
<p>Format lha <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p>Format mtree <b><br>
|
|
||||||
checkfs</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Allow reading information
|
|
||||||
missing from the mtree from the file system. Disabled by
|
|
||||||
default.</p>
|
|
||||||
|
|
||||||
<p>Format rar <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p>Format tar <b><br>
|
|
||||||
compat-2x</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Libarchive 2.x incorrectly
|
|
||||||
encoded Unicode filenames on some platforms. This option
|
|
||||||
mimics the libarchive 2.x filename handling so that such
|
|
||||||
archives can be read correctly.</p>
|
|
||||||
|
|
||||||
<p><b>hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p><b>mac-ext</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Support Mac OS metadata
|
|
||||||
extension that records data in special files beginning with
|
|
||||||
a period and underscore. Defaults to enabled on Mac OS,
|
|
||||||
disabled on other platforms. Use <b>!mac-ext</b> to
|
|
||||||
disable.</p>
|
|
||||||
|
|
||||||
<p><b>read_concatenated_archives</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Ignore zeroed blocks in the
|
|
||||||
archive, which occurs when multiple tar archives have been
|
|
||||||
concatenated together. Without this option, only the
|
|
||||||
contents of the first concatenated archive would be
|
|
||||||
read.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_write_set_options(3), libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
January 31, 2020 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,284 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:22 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_UTIL(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_UTIL(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_clear_error</b>,
|
|
||||||
<b>archive_compression</b>, <b>archive_compression_name</b>,
|
|
||||||
<b>archive_copy_error</b>, <b>archive_errno</b>,
|
|
||||||
<b>archive_error_string</b>, <b>archive_file_count</b>,
|
|
||||||
<b>archive_filter_code</b>, <b>archive_filter_count</b>,
|
|
||||||
<b>archive_filter_name</b>, <b>archive_format</b>,
|
|
||||||
<b>archive_format_name</b>, <b>archive_position</b>,
|
|
||||||
<b>archive_set_error</b> — libarchive utility
|
|
||||||
functions</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_clear_error</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_compression</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_compression_name</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_copy_error</b>(<i>struct archive *</i>,
|
|
||||||
<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_errno</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_error_string</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_file_count</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_filter_code</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_filter_count</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_filter_name</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_format</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>const char
|
|
||||||
*</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_format_name</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int64_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_position</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>void</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_set_error</b>(<i>struct archive *</i>,
|
|
||||||
<i>int error_code</i>,
|
|
||||||
<i>const char *fmt</i>, <i>...</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions provide access
|
|
||||||
to various information about the struct archive object used
|
|
||||||
in the libarchive(3) library.</p>
|
|
||||||
|
|
||||||
<p><b>archive_clear_error</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Clears any error information
|
|
||||||
left over from a previous call. Not generally used in client
|
|
||||||
code.</p>
|
|
||||||
|
|
||||||
<p><b>archive_compression</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Synonym for
|
|
||||||
<b>archive_filter_code</b>(<i>a</i>, <i>0</i>).</p>
|
|
||||||
|
|
||||||
<p><b>archive_compression_name</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Synonym for
|
|
||||||
<b>archive_filter_name</b>(<i>a</i>, <i>0</i>).</p>
|
|
||||||
|
|
||||||
<p><b>archive_copy_error</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Copies error information from
|
|
||||||
one archive to another.</p>
|
|
||||||
|
|
||||||
<p><b>archive_errno</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>archive_error_string</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns a textual error message
|
|
||||||
suitable for display. The error message here is usually more
|
|
||||||
specific than that obtained from passing the result of
|
|
||||||
<b>archive_errno</b>() to strerror(3).</p>
|
|
||||||
|
|
||||||
<p><b>archive_file_count</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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).</p>
|
|
||||||
|
|
||||||
<p><b>archive_filter_code</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns a numeric code
|
|
||||||
identifying the indicated filter. See
|
|
||||||
<b>archive_filter_count</b>() for details of the
|
|
||||||
numbering.</p>
|
|
||||||
|
|
||||||
<p><b>archive_filter_count</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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
|
|
||||||
<b>archive_write_add_filter_XXX</b>() functions. Filters in
|
|
||||||
the resulting 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-numbered filter.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">For example,
|
|
||||||
when reading a uuencoded gzipped tar archive, there are
|
|
||||||
three filters: filter 0 is the gunzip filter, filter 1 is
|
|
||||||
the uudecode filter, and filter 2 is the pseudo-filter that
|
|
||||||
wraps the archive read functions. In this case, requesting
|
|
||||||
<b>archive_position</b>(<i>a</i>, <i>-1</i>) would be a
|
|
||||||
synonym for <b>archive_position</b>(<i>a</i>, <i>2</i>)
|
|
||||||
which would return the number of bytes currently read from
|
|
||||||
the archive, while <b>archive_position</b>(<i>a</i>,
|
|
||||||
<i>1</i>) would return the number of bytes after uudecoding,
|
|
||||||
and <b>archive_position</b>(<i>a</i>, <i>0</i>) would return
|
|
||||||
the number of bytes after decompression.</p>
|
|
||||||
|
|
||||||
<p><b>archive_filter_name</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns a textual name
|
|
||||||
identifying the indicated filter. See
|
|
||||||
<b>archive_filter_count</b>() for details of the
|
|
||||||
numbering.</p>
|
|
||||||
|
|
||||||
<p><b>archive_format</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns a numeric code
|
|
||||||
indicating the format of the current archive entry. This
|
|
||||||
value is set by a successful call to
|
|
||||||
<b>archive_read_next_header</b>(). 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.</p>
|
|
||||||
|
|
||||||
<p><b>archive_format_name</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A textual description of the
|
|
||||||
format of the current entry.</p>
|
|
||||||
|
|
||||||
<p><b>archive_position</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Returns the number of bytes
|
|
||||||
read from or written to the indicated filter. In particular,
|
|
||||||
<b>archive_position</b>(<i>a</i>, <i>0</i>) returns the
|
|
||||||
number of bytes read or written by the format handler, while
|
|
||||||
<b>archive_position</b>(<i>a</i>, <i>-1</i>) returns the
|
|
||||||
number of bytes read or written to the archive. See
|
|
||||||
<b>archive_filter_count</b>() for details of the numbering
|
|
||||||
here.</p>
|
|
||||||
|
|
||||||
<p><b>archive_set_error</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Sets the numeric error code and
|
|
||||||
error description that will be returned by
|
|
||||||
<b>archive_errno</b>() and <b>archive_error_string</b>().
|
|
||||||
This function should be used within I/O callbacks to set
|
|
||||||
system-specific error codes and error descriptions. This
|
|
||||||
function accepts a printf-like format string and arguments.
|
|
||||||
However, you should be careful to use only the following
|
|
||||||
printf format specifiers: “%c”,
|
|
||||||
“%d”, “%jd”, “%jo”,
|
|
||||||
“%ju”, “%jx”, “%ld”,
|
|
||||||
“%lo”, “%lu”, “%lx”,
|
|
||||||
“%o”, “%u”, “%s”,
|
|
||||||
“%x”, “%%”. Field-width specifiers
|
|
||||||
and other printf features are not uniformly supported and
|
|
||||||
should not be used.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_read(3),
|
|
||||||
archive_write(3), libarchive(3), printf(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle <kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,290 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write</b> —
|
|
||||||
functions for creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Create
|
|
||||||
archive object</b> <br>
|
|
||||||
See archive_write_new(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">To write an
|
|
||||||
archive, you must first obtain an initialized struct archive
|
|
||||||
object from <b>archive_write_new</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Enable
|
|
||||||
filters and formats, configure block size and padding</b>
|
|
||||||
<br>
|
|
||||||
See archive_write_filter(3), archive_write_format(3) and
|
|
||||||
archive_write_blocksize(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">You can then
|
|
||||||
modify this object for the desired operations with the
|
|
||||||
various <b>archive_write_set_XXX</b>() functions. In
|
|
||||||
particular, you will need to invoke appropriate
|
|
||||||
<b>archive_write_add_XXX</b>() and
|
|
||||||
<b>archive_write_set_XXX</b>() functions to enable the
|
|
||||||
corresponding compression and format support.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Set
|
|
||||||
options</b> <br>
|
|
||||||
See archive_write_set_options(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Open
|
|
||||||
archive</b> <br>
|
|
||||||
See archive_write_open(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Once you have
|
|
||||||
prepared the struct archive object, you call
|
|
||||||
<b>archive_write_open</b>() 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, <i>FILE *</i> object,
|
|
||||||
or a block of memory from which to write the archive
|
|
||||||
data.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Produce
|
|
||||||
archive</b> <br>
|
|
||||||
See archive_write_header(3) and archive_write_data(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">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 <i>struct
|
|
||||||
stat</i> with a valid <i>st_mode</i> field, which specifies
|
|
||||||
the type of object and <i>st_size</i> field, which specifies
|
|
||||||
the size of the data portion of the object.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Release
|
|
||||||
resources</b> <br>
|
|
||||||
See archive_write_free(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">After all
|
|
||||||
entries have been written, use the
|
|
||||||
<b>archive_write_free</b>() function to release all
|
|
||||||
resources.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>EXAMPLES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The following sketch illustrates
|
|
||||||
basic usage of the library. In this example, the callback
|
|
||||||
functions are simply wrappers around the standard open(2),
|
|
||||||
write(2), and close(2) system calls.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">#ifdef
|
|
||||||
__linux__</p>
|
|
||||||
|
|
||||||
<table width="100%" border="0" rules="none" frame="void"
|
|
||||||
cellspacing="0" cellpadding="0">
|
|
||||||
<tr valign="top" align="left">
|
|
||||||
<td width="14%"></td>
|
|
||||||
<td width="10%">
|
|
||||||
|
|
||||||
|
|
||||||
<p>#define</p></td>
|
|
||||||
<td width="11%">
|
|
||||||
|
|
||||||
|
|
||||||
<p>_FILE_OFFSET_BITS 64</p></td>
|
|
||||||
<td width="65%">
|
|
||||||
</td></tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<p style="margin-left:14%;">#endif <br>
|
|
||||||
#include <sys/stat.h> <br>
|
|
||||||
#include <archive.h> <br>
|
|
||||||
#include <archive_entry.h> <br>
|
|
||||||
#include <fcntl.h> <br>
|
|
||||||
#include <stdlib.h> <br>
|
|
||||||
#include <unistd.h></p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">struct mydata {
|
|
||||||
<br>
|
|
||||||
const char *name; <br>
|
|
||||||
int fd; <br>
|
|
||||||
};</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">int <br>
|
|
||||||
myopen(struct archive *a, void *client_data) <br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata = client_data;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">mydata->fd =
|
|
||||||
open(mydata->name, O_WRONLY | O_CREAT, 0644); <br>
|
|
||||||
if (mydata->fd >= 0) <br>
|
|
||||||
return (ARCHIVE_OK); <br>
|
|
||||||
else <br>
|
|
||||||
return (ARCHIVE_FATAL); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">la_ssize_t <br>
|
|
||||||
mywrite(struct archive *a, void *client_data, const void
|
|
||||||
*buff, size_t n) <br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata = client_data;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">return
|
|
||||||
(write(mydata->fd, buff, n)); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">int <br>
|
|
||||||
myclose(struct archive *a, void *client_data) <br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata = client_data;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">if
|
|
||||||
(mydata->fd > 0) <br>
|
|
||||||
close(mydata->fd); <br>
|
|
||||||
return (0); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">void <br>
|
|
||||||
write_archive(const char *outname, const char **filename)
|
|
||||||
<br>
|
|
||||||
{ <br>
|
|
||||||
struct mydata *mydata = malloc(sizeof(struct mydata)); <br>
|
|
||||||
struct archive *a; <br>
|
|
||||||
struct archive_entry *entry; <br>
|
|
||||||
struct stat st; <br>
|
|
||||||
char buff[8192]; <br>
|
|
||||||
int len; <br>
|
|
||||||
int fd;</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">a =
|
|
||||||
archive_write_new(); <br>
|
|
||||||
mydata->name = outname; <br>
|
|
||||||
/* Set archive format and filter according to output file
|
|
||||||
extension. <br>
|
|
||||||
* If it fails, set default format. Platform depended
|
|
||||||
function. <br>
|
|
||||||
* See supported formats in
|
|
||||||
archive_write_set_format_filter_by_ext.c */ <br>
|
|
||||||
if (archive_write_set_format_filter_by_ext(a, outname) !=
|
|
||||||
ARCHIVE_OK) { <br>
|
|
||||||
archive_write_add_filter_gzip(a); <br>
|
|
||||||
archive_write_set_format_ustar(a); <br>
|
|
||||||
} <br>
|
|
||||||
archive_write_open(a, mydata, myopen, mywrite, myclose);
|
|
||||||
<br>
|
|
||||||
while (*filename) { <br>
|
|
||||||
stat(*filename, &st); <br>
|
|
||||||
entry = archive_entry_new(); <br>
|
|
||||||
archive_entry_copy_stat(entry, &st); <br>
|
|
||||||
archive_entry_set_pathname(entry, *filename); <br>
|
|
||||||
archive_write_header(a, entry); <br>
|
|
||||||
if ((fd = open(*filename, O_RDONLY)) != -1) { <br>
|
|
||||||
len = read(fd, buff, sizeof(buff)); <br>
|
|
||||||
while (len > 0) { <br>
|
|
||||||
archive_write_data(a, buff, len); <br>
|
|
||||||
len = read(fd, buff, sizeof(buff)); <br>
|
|
||||||
} <br>
|
|
||||||
close(fd); <br>
|
|
||||||
} <br>
|
|
||||||
archive_entry_free(entry); <br>
|
|
||||||
filename++; <br>
|
|
||||||
} <br>
|
|
||||||
archive_write_free(a); <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">int main(int
|
|
||||||
argc, const char **argv) <br>
|
|
||||||
{ <br>
|
|
||||||
const char *outname; <br>
|
|
||||||
argv++; <br>
|
|
||||||
outname = *argv++; <br>
|
|
||||||
write_archive(outname, argv); <br>
|
|
||||||
return 0; <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle <kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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
|
|
||||||
incorrectly and will thus reject valid archives; GNU tar
|
|
||||||
does not fully support pax interchange format; some old tar
|
|
||||||
implementations required specific field terminations.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The default pax
|
|
||||||
interchange format eliminates most of the historic tar
|
|
||||||
limitations and provides a generic key/value attribute
|
|
||||||
facility for vendor-defined extensions. One oversight in
|
|
||||||
POSIX is the failure to provide a standard attribute for
|
|
||||||
large device numbers. This library uses
|
|
||||||
“SCHILY.devminor” and
|
|
||||||
“SCHILY.devmajor” for device numbers that exceed
|
|
||||||
the range supported by the backwards-compatible ustar
|
|
||||||
header. These keys are compatible with Joerg
|
|
||||||
Schilling’s <b>star</b> archiver. Other
|
|
||||||
implementations may not recognize these keys and will thus
|
|
||||||
be unable to correctly restore device nodes with large
|
|
||||||
device numbers from archives created by this library.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,141 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_BLOCKSI... BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_BLOCKSI...</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_get_bytes_per_block</b>,
|
|
||||||
<b>archive_write_set_bytes_per_block</b>,
|
|
||||||
<b>archive_write_get_bytes_in_last_block</b>,
|
|
||||||
<b>archive_write_set_bytes_in_last_block</b> —
|
|
||||||
functions for creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_get_bytes_per_block</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_bytes_per_block</b>(<i>struct archive *</i>,
|
|
||||||
<i>int bytes_per_block</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_get_bytes_in_last_block</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_bytes_in_last_block</b>(<i>struct archive *</i>,
|
|
||||||
<i>int</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_write_set_bytes_per_block</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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 block size of 10240
|
|
||||||
bytes. Note that a block size of zero will suppress internal
|
|
||||||
blocking and cause writes to be sent directly to the write
|
|
||||||
callback as they occur.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_get_bytes_per_block</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_bytes_in_last_block</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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 multiple of
|
|
||||||
this size. In particular, setting it to 1 will cause the
|
|
||||||
final block to not be padded. For compressed output, any
|
|
||||||
padding generated by this option is applied only after the
|
|
||||||
compression. The uncompressed data is always unpadded. The
|
|
||||||
default is to pad the last block to the full block size
|
|
||||||
(note that <b>archive_write_open_filename</b>() will set
|
|
||||||
this based on the file type). Unlike the other
|
|
||||||
“set” functions, this function can be called
|
|
||||||
after the archive is opened.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_get_bytes_in_last_block</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Retrieve the currently-set
|
|
||||||
value for last block size. A value of -1 here indicates that
|
|
||||||
the library should use default values.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_set_bytes_per_block</b>()
|
|
||||||
and <b>archive_write_set_bytes_in_last_block</b>() return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_write_get_bytes_per_block</b>()
|
|
||||||
and <b>archive_write_get_bytes_in_last_block</b>() return
|
|
||||||
currently configured block size (</p>
|
|
||||||
|
|
||||||
<p>-1 indicates the default block size ), or
|
|
||||||
<b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,107 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_DATA(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_DATA(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_data</b>,
|
|
||||||
<b>archive_write_data_block</b> — functions for
|
|
||||||
creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>la_ssize_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_data</b>(<i>struct archive *</i>,
|
|
||||||
<i>const void *</i>, <i>size_t</i>);</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>la_ssize_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_data_block</b>(<i>struct archive *</i>,
|
|
||||||
<i>const void *</i>, <i>size_t size</i>,
|
|
||||||
<i>int64_t offset</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_write_data</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Write data corresponding to the
|
|
||||||
header just written.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_data_block</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Write data corresponding to the
|
|
||||||
header just written. This is like
|
|
||||||
<b>archive_write_data</b>() 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">This function returns the number
|
|
||||||
of bytes actually written, or a negative error code on
|
|
||||||
error.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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 <i>archive_write_disk</i> handle. Clients
|
|
||||||
should treat any value less than zero as an error and
|
|
||||||
consider any non-negative value as success.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1),
|
|
||||||
archive_write_finish_entry(3), archive_write_set_options(3),
|
|
||||||
libarchive(3), cpio(5), mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 28, 2017 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,376 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_DISK(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_DISK(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_disk_new</b>,
|
|
||||||
<b>archive_write_disk_set_options</b>,
|
|
||||||
<b>archive_write_disk_set_skip_file</b>,
|
|
||||||
<b>archive_write_disk_set_group_lookup</b>,
|
|
||||||
<b>archive_write_disk_set_standard_lookup</b>,
|
|
||||||
<b>archive_write_disk_set_user_lookup</b> — functions
|
|
||||||
for creating objects on disk</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_disk_new</b>(<i>void</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_disk_set_options</b>(<i>struct archive *</i>,
|
|
||||||
<i>int flags</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_disk_set_skip_file</b>(<i>struct archive *</i>,
|
|
||||||
<i>dev_t</i>, <i>ino_t</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_disk_set_group_lookup</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *</i>,
|
|
||||||
<i>gid_t (*)(void *, const char *gname, gid_t gid)</i>,
|
|
||||||
<i>void (*cleanup)(void *)</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_disk_set_standard_lookup</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_disk_set_user_lookup</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *</i>,
|
|
||||||
<i>uid_t (*)(void *, const char *uname, uid_t uid)</i>,
|
|
||||||
<i>void (*cleanup)(void *)</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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
|
|
||||||
<b>archive_read</b>() interface. The general process is to
|
|
||||||
read struct archive_entry objects from an archive, then
|
|
||||||
write those objects to a struct archive object created using
|
|
||||||
the <b>archive_write_disk</b>() family functions. This
|
|
||||||
interface is deliberately very similar to the
|
|
||||||
<b>archive_write</b>() interface used to write objects to a
|
|
||||||
streaming archive.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_disk_new</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Allocates and initializes a
|
|
||||||
struct archive object suitable for writing objects to
|
|
||||||
disk.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_disk_set_skip_file</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_disk_set_options</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The options field consists of a
|
|
||||||
bitwise OR of one or more of the following values:</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_ACL</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Attempt to restore Access
|
|
||||||
Control Lists. By default, extended ACLs are ignored.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Before removing a file system
|
|
||||||
object prior to replacing it, clear platform-specific file
|
|
||||||
flags which might prevent its removal.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_FFLAGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_MAC_METADATA</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Mac OS X specific. Restore
|
|
||||||
metadata using copyfile(3). By default, copyfile(3) metadata
|
|
||||||
is ignored.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_NO_OVERWRITE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_OWNER</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The user and group IDs should
|
|
||||||
be set on the restored file. By default, the user and group
|
|
||||||
IDs are not restored.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_PERM</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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
|
|
||||||
<b>ARCHIVE_EXTRACT_OWNER</b> 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.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_SAFE_WRITES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Extract files atomically, by
|
|
||||||
first creating a unique temporary file and then renaming it
|
|
||||||
to its required destination name. This avoids a race where
|
|
||||||
an application might see a partial file (or no file) during
|
|
||||||
extraction.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Refuse to extract an absolute
|
|
||||||
path. The default is to not refuse such paths.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_SECURE_NODOTDOT</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Refuse to extract a path that
|
|
||||||
contains a <i>..</i> element anywhere within it. The default
|
|
||||||
is to not refuse such paths. Note that paths ending in
|
|
||||||
<i>..</i> always cause an error, regardless of this
|
|
||||||
flag.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_SECURE_SYMLINKS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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 <b>ARCHIVE_EXTRACT_UNLINK</b> is
|
|
||||||
specified together with this option, the library will remove
|
|
||||||
any intermediate symlinks it finds and return an error only
|
|
||||||
if such symlink could not be removed.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_SPARSE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Scan data for blocks of NUL
|
|
||||||
bytes and try to recreate them with holes. This results in
|
|
||||||
sparse files, independent of whether the archive format
|
|
||||||
supports or uses them.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_TIME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The timestamps (mtime, ctime,
|
|
||||||
and atime) should be restored. By default, they are ignored.
|
|
||||||
Note that restoring of atime is not currently supported.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_UNLINK</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>ARCHIVE_EXTRACT_XATTR</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_disk_set_group_lookup</b>(),
|
|
||||||
<b>archive_write_disk_set_user_lookup</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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 lists.
|
|
||||||
By default, the library uses the ids and ignores the names,
|
|
||||||
but this can be overridden by registering user and group
|
|
||||||
lookup functions. To register, you must provide a lookup
|
|
||||||
function which accepts both a name and id and returns a
|
|
||||||
suitable id. You may also provide a void * pointer to a
|
|
||||||
private data structure and a cleanup function for that data.
|
|
||||||
The cleanup function will be invoked when the struct archive
|
|
||||||
object is destroyed.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_disk_set_standard_lookup</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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 simple memory
|
|
||||||
cache to reduce the number of calls to getpwnam(3) and
|
|
||||||
getgrnam(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">More information about the
|
|
||||||
<i>struct archive</i> object and the overall design of the
|
|
||||||
library can be found in the libarchive(3) overview. Many of
|
|
||||||
these functions are also documented under
|
|
||||||
archive_write(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Most functions return
|
|
||||||
<b>ARCHIVE_OK</b> (zero) on success, or one of several
|
|
||||||
non-zero error codes for errors. Specific error codes
|
|
||||||
include: <b>ARCHIVE_RETRY</b> for operations that might
|
|
||||||
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
|
|
||||||
conditions that do not prevent further operations, and
|
|
||||||
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
|
|
||||||
operations impossible.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_write_disk_new</b>()
|
|
||||||
returns a pointer to a newly-allocated struct archive
|
|
||||||
object.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_write_data</b>()
|
|
||||||
returns a count of the number of bytes actually written, or
|
|
||||||
-1 on error.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_read(3),
|
|
||||||
archive_write(3), libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3. The
|
|
||||||
<b>archive_write_disk</b> interface was added to
|
|
||||||
<b>libarchive 2.0</b> and first appeared in
|
|
||||||
FreeBSD 6.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle <kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Directories are actually
|
|
||||||
extracted in two distinct phases. Directories are created
|
|
||||||
during <b>archive_write_header</b>(), but final permissions
|
|
||||||
are not set until <b>archive_write_close</b>(). This
|
|
||||||
separation is necessary to correctly handle borderline cases
|
|
||||||
such as a non-writable directory containing 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 <b>archive_read_extract</b>() or before
|
|
||||||
calling <b>archive_read_close</b>(), you may confuse the
|
|
||||||
permission-setting logic with the result that directory
|
|
||||||
permissions are restored incorrectly.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The library
|
|
||||||
attempts to create objects with filenames longer than
|
|
||||||
<b>PATH_MAX</b> 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Restoring the
|
|
||||||
path <i>aa/../bb</i> does create each intermediate
|
|
||||||
directory. In particular, the directory <i>aa</i> is created
|
|
||||||
as well as the final object <i>bb</i>. In theory, this can
|
|
||||||
be exploited to create an entire directory hierarchy with a
|
|
||||||
single request. Of course, this does not work if the
|
|
||||||
<b>ARCHIVE_EXTRACT_NODOTDOT</b> option is specified.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Implicit
|
|
||||||
directories are always created obeying the current umask.
|
|
||||||
Explicit objects are created obeying the current umask
|
|
||||||
unless <b>ARCHIVE_EXTRACT_PERM</b> is specified, in which
|
|
||||||
case they current umask is ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">SGID and SUID
|
|
||||||
bits are restored only if the correct user and group could
|
|
||||||
be set. If <b>ARCHIVE_EXTRACT_OWNER</b> 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The
|
|
||||||
“standard” user-id and group-id lookup functions
|
|
||||||
are not the defaults because getgrnam(3) and getpwnam(3) are
|
|
||||||
sometimes too large for particular applications. The current
|
|
||||||
design allows the application author to use a more compact
|
|
||||||
implementation when appropriate.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">There should be
|
|
||||||
a corresponding <b>archive_read_disk</b> interface that
|
|
||||||
walks a directory hierarchy and returns archive entry
|
|
||||||
objects.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
January 19, 2020 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,193 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_FILTER(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_FILTER(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_add_filter_b64encode</b>,
|
|
||||||
<b>archive_write_add_filter_by_name</b>,
|
|
||||||
<b>archive_write_add_filter_bzip2</b>,
|
|
||||||
<b>archive_write_add_filter_compress</b>,
|
|
||||||
<b>archive_write_add_filter_grzip</b>,
|
|
||||||
<b>archive_write_add_filter_gzip</b>,
|
|
||||||
<b>archive_write_add_filter_lrzip</b>,
|
|
||||||
<b>archive_write_add_filter_lz4</b>,
|
|
||||||
<b>archive_write_add_filter_lzip</b>,
|
|
||||||
<b>archive_write_add_filter_lzma</b>,
|
|
||||||
<b>archive_write_add_filter_lzop</b>,
|
|
||||||
<b>archive_write_add_filter_none</b>,
|
|
||||||
<b>archive_write_add_filter_program</b>,
|
|
||||||
<b>archive_write_add_filter_uuencode</b>,
|
|
||||||
<b>archive_write_add_filter_xz</b>,
|
|
||||||
<b>archive_write_add_filter_zstd</b> — functions
|
|
||||||
enabling output filters</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_b64encode</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_bzip2</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_compress</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_grzip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_gzip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_lrzip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_lz4</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_lzip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_lzma</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_lzop</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_none</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_program</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char * cmd</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_uuencode</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_xz</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_add_filter_zstd</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_write_add_filter_bzip2</b>(),
|
|
||||||
<b>archive_write_add_filter_compress</b>(),
|
|
||||||
<b>archive_write_add_filter_grzip</b>(),
|
|
||||||
<b>archive_write_add_filter_gzip</b>(),
|
|
||||||
<b>archive_write_add_filter_lrzip</b>(),
|
|
||||||
<b>archive_write_add_filter_lz4</b>(),
|
|
||||||
<b>archive_write_add_filter_lzip</b>(),
|
|
||||||
<b>archive_write_add_filter_lzma</b>(),
|
|
||||||
<b>archive_write_add_filter_lzop</b>(),
|
|
||||||
<b>archive_write_add_filter_xz</b>(),
|
|
||||||
<b>archive_write_add_filter_zstd</b>(),</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The resulting archive will be
|
|
||||||
compressed as specified. Note that the compressed output is
|
|
||||||
always properly blocked.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_add_filter_b64encode</b>(),
|
|
||||||
<b>archive_write_add_filter_uuencode</b>(),</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The output will be encoded as
|
|
||||||
specified. The encoded output is always properly
|
|
||||||
blocked.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_add_filter_none</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This is never necessary. It is
|
|
||||||
provided only for backwards compatibility.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_add_filter_program</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The archive will be fed into
|
|
||||||
the specified compression program. The output of that
|
|
||||||
program is blocked and written to the client write
|
|
||||||
callbacks.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_write(3),
|
|
||||||
archive_write_format(3), archive_write_set_options(3),
|
|
||||||
libarchive(3), cpio(5), mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
August 14, 2014 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,85 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_FINISH_... BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_FINISH_...</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_finish_entry</b>
|
|
||||||
— functions for creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_finish_entry</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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
|
|
||||||
<b>archive_write_header</b>() and
|
|
||||||
<b>archive_write_close</b>() as needed. For
|
|
||||||
archive_write_disk handles, this flushes pending file
|
|
||||||
attribute changes like modification time.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">This function returns
|
|
||||||
<b>ARCHIVE_OK</b> on success, or one of several non-zero
|
|
||||||
error codes for errors. Specific error codes include:
|
|
||||||
<b>ARCHIVE_RETRY</b> for operations that might succeed if
|
|
||||||
retried, <b>ARCHIVE_WARN</b> for unusual conditions that do
|
|
||||||
not prevent further operations, and <b>ARCHIVE_FATAL</b> for
|
|
||||||
serious errors that make remaining operations
|
|
||||||
impossible.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_write_data(3),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 28, 2017 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,285 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_FORMAT(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_FORMAT(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_set_format</b>,
|
|
||||||
<b>archive_write_set_format_7zip</b>,
|
|
||||||
<b>archive_write_set_format_ar</b>,
|
|
||||||
<b>archive_write_set_format_ar_bsd</b>,
|
|
||||||
<b>archive_write_set_format_ar_svr4</b>,
|
|
||||||
<b>archive_write_set_format_by_name</b>,
|
|
||||||
<b>archive_write_set_format_cpio</b>,
|
|
||||||
<b>archive_write_set_format_cpio_bin</b>,
|
|
||||||
<b>archive_write_set_format_cpio_newc</b>,
|
|
||||||
<b>archive_write_set_format_cpio_odc</b>,
|
|
||||||
<b>archive_write_set_format_cpio_pwb</b>,
|
|
||||||
<b>archive_write_set_format_filter_by_ext</b>,
|
|
||||||
<b>archive_write_set_format_filter_by_ext_def</b>,
|
|
||||||
<b>archive_write_set_format_gnutar</b>,
|
|
||||||
<b>archive_write_set_format_iso9660</b>,
|
|
||||||
<b>archive_write_set_format_mtree</b>,
|
|
||||||
<b>archive_write_set_format_mtree_classic</b>,
|
|
||||||
<b>archive_write_set_format_mtree_default</b>,
|
|
||||||
<b>archive_write_set_format_pax</b>,
|
|
||||||
<b>archive_write_set_format_pax_restricted</b>,
|
|
||||||
<b>archive_write_set_format_raw</b>,
|
|
||||||
<b>archive_write_set_format_shar</b>,
|
|
||||||
<b>archive_write_set_format_shar_dump</b>,
|
|
||||||
<b>archive_write_set_format_ustar</b>,
|
|
||||||
<b>archive_write_set_format_v7tar</b>,
|
|
||||||
<b>archive_write_set_format_warc</b>,
|
|
||||||
<b>archive_write_set_format_xar</b>,
|
|
||||||
<b>archive_write_set_format_zip</b> — functions for
|
|
||||||
creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format</b>(<i>struct archive *</i>,
|
|
||||||
<i>int code</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_7zip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_ar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_ar_bsd</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_ar_svr4</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_by_name</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *name</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_bin</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_newc</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_odc</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_cpio_pwb</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_filter_by_ext</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *filename</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_filter_by_ext_def</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *filename</i>,
|
|
||||||
<i>const char *def_ext</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_gnutar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_iso9660</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_mtree</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_pax</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_pax_restricted</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_raw</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_shar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_shar_dump</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_ustar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_v7tar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_warc</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_xar</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_set_format_zip</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions set the format
|
|
||||||
that will be used for the archive.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The library can
|
|
||||||
write a variety of common archive formats.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_format</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Sets the format based on the
|
|
||||||
format code (see <i>archive.h</i> for the full list of
|
|
||||||
format codes). In particular, this can be used in
|
|
||||||
conjunction with <b>archive_format</b>() to create a new
|
|
||||||
archive with the same format as an existing archive.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_format_by_name</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Sets the corresponding format
|
|
||||||
based on the common name.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_format_filter_by_ext</b>()
|
|
||||||
<b>archive_write_set_format_filter_by_ext_def</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Sets both filters and format
|
|
||||||
based on the output filename. Supported extensions: .7z,
|
|
||||||
.zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz,
|
|
||||||
.tar.bz2, .tar.xz</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_format_7zip</b>()
|
|
||||||
<b>archive_write_set_format_ar_bsd</b>()
|
|
||||||
<b>archive_write_set_format_ar_svr4</b>()
|
|
||||||
<b>archive_write_set_format_cpio</b>()
|
|
||||||
<b>archive_write_set_format_cpio_bin</b>()
|
|
||||||
<b>archive_write_set_format_cpio_newc</b>()
|
|
||||||
<b>archive_write_set_format_cpio_odc</b>()
|
|
||||||
<b>archive_write_set_format_cpio_pwb</b>()
|
|
||||||
<b>archive_write_set_format_gnutar</b>()
|
|
||||||
<b>archive_write_set_format_iso9660</b>()
|
|
||||||
<b>archive_write_set_format_mtree</b>()
|
|
||||||
<b>archive_write_set_format_mtree_classic</b>()
|
|
||||||
<b>archive_write_set_format_pax</b>()
|
|
||||||
<b>archive_write_set_format_pax_restricted</b>()
|
|
||||||
<b>archive_write_set_format_raw</b>()
|
|
||||||
<b>archive_write_set_format_shar</b>()
|
|
||||||
<b>archive_write_set_format_shar_dump</b>()
|
|
||||||
<b>archive_write_set_format_ustar</b>()
|
|
||||||
<b>archive_write_set_format_v7tar</b>()
|
|
||||||
<b>archive_write_set_format_warc</b>()
|
|
||||||
<b>archive_write_set_format_xar</b>()
|
|
||||||
<b>archive_write_set_format_zip</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Set the format as specified.
|
|
||||||
More details on the formats supported by libarchive can be
|
|
||||||
found in the libarchive-formats(5) manual page.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_write(3),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
libarchive-formats(5), mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 14, 2013 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,116 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_FREE(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_FREE(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_fail</b>,
|
|
||||||
<b>archive_write_close</b>, <b>archive_write_finish</b>,
|
|
||||||
<b>archive_write_free</b> — functions for creating
|
|
||||||
archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_fail</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_close</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_finish</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_free</b>(<i>struct archive *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_write_fail</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Always returns
|
|
||||||
<b>ARCHIVE_FATAL</b>. This marks the archive object as being
|
|
||||||
unusable; after calling this function, the only call that
|
|
||||||
can succeed is <b>archive_write_free</b>() to release the
|
|
||||||
resources. This can be used to speed recovery when the
|
|
||||||
archive creation must be aborted. Note that the created
|
|
||||||
archive is likely to be malformed in this case;</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_close</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Complete the archive and invoke
|
|
||||||
the close callback.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_finish</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This is a deprecated synonym
|
|
||||||
for <b>archive_write_free</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_free</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Invokes
|
|
||||||
<b>archive_write_close</b>() if necessary, then releases all
|
|
||||||
resources. If you need detailed information about
|
|
||||||
<b>archive_write_close</b>() failures, you should be careful
|
|
||||||
to call it separately, as you cannot obtain error
|
|
||||||
information after <b>archive_write_free</b>() returns.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,80 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_HEADER(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_HEADER(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_header</b>
|
|
||||||
— functions for creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_header</b>(<i>struct archive *</i>,
|
|
||||||
<i>struct archive_entry *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">This function returns
|
|
||||||
<b>ARCHIVE_OK</b> on success, or one of the following on
|
|
||||||
error: <b>ARCHIVE_RETRY</b> for operations that might
|
|
||||||
succeed if retried, <b>ARCHIVE_WARN</b> for unusual
|
|
||||||
conditions that do not prevent further operations, and
|
|
||||||
<b>ARCHIVE_FATAL</b> for serious errors that make remaining
|
|
||||||
operations impossible.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,67 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_NEW(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_NEW(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_new</b> —
|
|
||||||
functions for creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>struct
|
|
||||||
archive *</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_new</b>(<i>void</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Allocates and initializes a
|
|
||||||
struct archive object suitable for writing a tar archive.
|
|
||||||
NULL is returned on error.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">A complete
|
|
||||||
description of the struct archive object can be found in the
|
|
||||||
overview manual page for libarchive(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_write(3),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
February 2, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,269 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:23 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_OPEN(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_OPEN(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_open</b>,
|
|
||||||
<b>archive_write_open2</b>, <b>archive_write_open_fd</b>,
|
|
||||||
<b>archive_write_open_FILE</b>,
|
|
||||||
<b>archive_write_open_filename</b>,
|
|
||||||
<b>archive_write_open_memory</b> — functions for
|
|
||||||
creating archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_open</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>archive_open_callback *</i>,
|
|
||||||
<i>archive_write_callback *</i>,
|
|
||||||
<i>archive_close_callback *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_open2</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>archive_open_callback *</i>,
|
|
||||||
<i>archive_write_callback *</i>,
|
|
||||||
<i>archive_close_callback *</i>,
|
|
||||||
<i>archive_free_callback *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_open_fd</b>(<i>struct archive *</i>,
|
|
||||||
<i>int fd</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_open_FILE</b>(<i>struct archive *</i>,
|
|
||||||
<i>FILE *file</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_write_open_filename</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *filename</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_open_memory</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *buffer</i>, <i>size_t bufferSize</i>,
|
|
||||||
<i>size_t *outUsed</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_write_open</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Freeze the settings, open the
|
|
||||||
archive, and prepare for writing entries. This is the most
|
|
||||||
generic form of this function, which accepts pointers to
|
|
||||||
three callback functions which will be invoked by the
|
|
||||||
compression layer to write the constructed archive. This
|
|
||||||
does not alter the default archive padding.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_open2</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Same as
|
|
||||||
<b>archive_write_open</b>() with an additional fourth free
|
|
||||||
callback. This function should be preferred to
|
|
||||||
<b>archive_write_open</b>().</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_open_fd</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A convenience form of
|
|
||||||
<b>archive_write_open</b>() that accepts a file descriptor.
|
|
||||||
The <b>archive_write_open_fd</b>() function is safe for use
|
|
||||||
with tape drives or other block-oriented devices.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_open_FILE</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A convenience form of
|
|
||||||
<b>archive_write_open</b>() that accepts a <i>FILE *</i>
|
|
||||||
pointer. Note that <b>archive_write_open_FILE</b>() is not
|
|
||||||
safe for writing to tape drives or other devices that
|
|
||||||
require correct blocking.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_open_file</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A deprecated synonym for
|
|
||||||
<b>archive_write_open_filename</b>().</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_open_filename</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A convenience form of
|
|
||||||
<b>archive_write_open</b>() that accepts a filename. A NULL
|
|
||||||
argument indicates that the output should be written to
|
|
||||||
standard output; an argument of “-” will open a
|
|
||||||
file with that name. If you have not invoked
|
|
||||||
<b>archive_write_set_bytes_in_last_block</b>(), then
|
|
||||||
<b>archive_write_open_filename</b>() will adjust the
|
|
||||||
last-block padding depending on the file: it will enable
|
|
||||||
padding when writing to standard output or to a character or
|
|
||||||
block device node, it will disable padding otherwise. You
|
|
||||||
can override this by manually invoking
|
|
||||||
<b>archive_write_set_bytes_in_last_block</b>() before
|
|
||||||
calling <b>archive_write_open2</b>(). The
|
|
||||||
<b>archive_write_open_filename</b>() function is safe for
|
|
||||||
use with tape drives or other block-oriented devices.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_open_memory</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">A convenience form of
|
|
||||||
<b>archive_write_open2</b>() that accepts a pointer to a
|
|
||||||
block of memory that will receive the archive. The final
|
|
||||||
<i>size_t *</i> argument points to a variable that will be
|
|
||||||
updated after each write to reflect how much of the buffer
|
|
||||||
is currently in use. You should be careful to ensure that
|
|
||||||
this variable remains allocated until after the archive is
|
|
||||||
closed. This function will disable padding unless you have
|
|
||||||
specifically set the block size.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">More information about the
|
|
||||||
<i>struct archive</i> object and the overall design of the
|
|
||||||
library can be found in the libarchive(3) overview.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Note that the
|
|
||||||
convenience forms above vary in how they block the output.
|
|
||||||
See archive_write_blocksize(3) if you need to control the
|
|
||||||
block size used for writes or the end-of-file padding
|
|
||||||
behavior.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>CLIENT CALLBACKS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">To use this library, you will
|
|
||||||
need to define and register callback functions that will be
|
|
||||||
invoked to write data to the resulting archive. These
|
|
||||||
functions are registered by calling
|
|
||||||
<b>archive_write_open2</b>():</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
int</i> <b>archive_open_callback</b>(<i>struct archive
|
|
||||||
*</i>, <i>void *client_data</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The open
|
|
||||||
callback is invoked by <b>archive_write_open</b>(). It
|
|
||||||
should return <b>ARCHIVE_OK</b> if the underlying file or
|
|
||||||
data source is successfully opened. If the open fails, it
|
|
||||||
should call <b>archive_set_error</b>() to register an error
|
|
||||||
code and message and return <b>ARCHIVE_FATAL</b>. Please
|
|
||||||
note that if open fails, close is not called and resources
|
|
||||||
must be freed inside the open callback or with the free
|
|
||||||
callback.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
la_ssize_t</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_callback</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>const void *buffer</i>,
|
|
||||||
<i>size_t length</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The write
|
|
||||||
callback is invoked whenever the library needs to write raw
|
|
||||||
bytes to the archive. For correct blocking, each call to the
|
|
||||||
write callback 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
|
|
||||||
<b>archive_set_error</b>() to register an error code and
|
|
||||||
message and return -1.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
int</i> <b>archive_close_callback</b>(<i>struct archive
|
|
||||||
*</i>, <i>void *client_data</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The close
|
|
||||||
callback is invoked by archive_close when the archive
|
|
||||||
processing is complete. If the open callback fails, the
|
|
||||||
close callback is not invoked. The callback should return
|
|
||||||
<b>ARCHIVE_OK</b> on success. On failure, the callback
|
|
||||||
should invoke <b>archive_set_error</b>() to register an
|
|
||||||
error code and message and return <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em"><i>typedef
|
|
||||||
int</i> <b>archive_free_callback</b>(<i>struct archive
|
|
||||||
*</i>, <i>void *client_data</i>)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The free
|
|
||||||
callback is always invoked on archive_free. The return code
|
|
||||||
of this callback is not processed.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Note that if the
|
|
||||||
client-provided write callback function returns a non-zero
|
|
||||||
value, that error will be propagated back to the caller
|
|
||||||
through whatever API function resulted in that call, which
|
|
||||||
may include <b>archive_write_header</b>(),
|
|
||||||
<b>archive_write_data</b>(), <b>archive_write_close</b>(),
|
|
||||||
<b>archive_write_finish</b>(), or
|
|
||||||
<b>archive_write_free</b>(). The client callback can call
|
|
||||||
<b>archive_set_error</b>() to provide values that can then
|
|
||||||
be retrieved by <b>archive_errno</b>() and
|
|
||||||
<b>archive_error_string</b>().</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions return
|
|
||||||
<b>ARCHIVE_OK</b> on success, or <b>ARCHIVE_FATAL</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed error codes and textual
|
|
||||||
descriptions are available from the <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_write(3),
|
|
||||||
archive_write_blocksize(3), archive_write_filter(3),
|
|
||||||
archive_write_format(3), archive_write_new(3),
|
|
||||||
archive_write_set_options(3), libarchive(3), cpio(5),
|
|
||||||
mtree(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
November 12, 2020 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,824 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_OPTIONS(3) BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_OPTIONS(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_set_filter_option</b>,
|
|
||||||
<b>archive_write_set_format_option</b>,
|
|
||||||
<b>archive_write_set_option</b>,
|
|
||||||
<b>archive_write_set_options</b> — functions
|
|
||||||
controlling options for writing archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_set_filter_option</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *module</i>,
|
|
||||||
<i>const char *option</i>,
|
|
||||||
<i>const char *value</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_set_format_option</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *module</i>,
|
|
||||||
<i>const char *option</i>,
|
|
||||||
<i>const char *value</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_set_option</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *module</i>,
|
|
||||||
<i>const char *option</i>,
|
|
||||||
<i>const char *value</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_set_options</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *options</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">These functions provide a way
|
|
||||||
for libarchive clients to configure specific write
|
|
||||||
modules.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_filter_option</b>(),
|
|
||||||
<b>archive_write_set_format_option</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Specifies an option that will
|
|
||||||
be passed to the currently-registered filters (including
|
|
||||||
decompression filters) or format readers.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">If
|
|
||||||
<i>option</i> and <i>value</i> are both NULL, these
|
|
||||||
functions will do nothing and <b>ARCHIVE_OK</b> will be
|
|
||||||
returned. If <i>option</i> is NULL but <i>value</i> is not,
|
|
||||||
these functions will do nothing and <b>ARCHIVE_FAILED</b>
|
|
||||||
will be returned.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">If
|
|
||||||
<i>module</i> is not NULL, <i>option</i> and <i>value</i>
|
|
||||||
will be provided to the filter or reader named
|
|
||||||
<i>module</i>. The return value will be either
|
|
||||||
<b>ARCHIVE_OK</b> if the option was successfully handled or
|
|
||||||
<b>ARCHIVE_WARN</b> if the option was unrecognized by the
|
|
||||||
module or could otherwise not be handled. If there is no
|
|
||||||
such module, <b>ARCHIVE_FAILED</b> will be returned.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">If
|
|
||||||
<i>module</i> is NULL, <i>option</i> and <i>value</i> will
|
|
||||||
be provided to every registered module. If any module
|
|
||||||
returns <b>ARCHIVE_FATAL</b>, this value will be returned
|
|
||||||
immediately. Otherwise, <b>ARCHIVE_OK</b> will be returned
|
|
||||||
if any module accepts the option, and <b>ARCHIVE_FAILED</b>
|
|
||||||
in all other cases.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_option</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Calls
|
|
||||||
<b>archive_write_set_format_option</b>(), then
|
|
||||||
<b>archive_write_set_filter_option</b>(). If either function
|
|
||||||
returns <b>ARCHIVE_FATAL</b>, <b>ARCHIVE_FATAL</b> will be
|
|
||||||
returned immediately. Otherwise, the greater of the two
|
|
||||||
values will be returned.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_options</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;"><i>options</i> is a
|
|
||||||
comma-separated list of options. If <i>options</i> is NULL
|
|
||||||
or empty, <b>ARCHIVE_OK</b> will be returned
|
|
||||||
immediately.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Individual
|
|
||||||
options have one of the following forms:</p>
|
|
||||||
|
|
||||||
<p><i>option=value</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The option/value pair will be
|
|
||||||
provided to every module. Modules that do not accept an
|
|
||||||
option with this name will ignore it.</p>
|
|
||||||
|
|
||||||
<p><i>option</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">The option will
|
|
||||||
be provided to every module with a value of
|
|
||||||
“1”.</p>
|
|
||||||
|
|
||||||
<p><i>!option</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The option will be provided to
|
|
||||||
every module with a NULL value.</p>
|
|
||||||
|
|
||||||
<p><i>module:option=value</i>, <i>module:option</i>,
|
|
||||||
<i>module:!option</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">As above, but the corresponding
|
|
||||||
option and value will be provided only to modules whose name
|
|
||||||
matches <i>module</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>OPTIONS</b> <br>
|
|
||||||
Filter b64encode <b><br>
|
|
||||||
mode</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">The value is
|
|
||||||
interpreted as octal digits specifying the file mode.</p>
|
|
||||||
|
|
||||||
<p><b>name</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">The value
|
|
||||||
specifies the file name.</p>
|
|
||||||
|
|
||||||
<p>Filter bzip2 <b><br>
|
|
||||||
compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the bzip2 compression level.
|
|
||||||
Supported values are from 1 to 9.</p>
|
|
||||||
|
|
||||||
<p>Filter gzip <b><br>
|
|
||||||
compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the gzip compression level.
|
|
||||||
Supported values are from 0 to 9.</p>
|
|
||||||
|
|
||||||
<p><b>timestamp</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Store timestamp. This is
|
|
||||||
enabled by default.</p>
|
|
||||||
|
|
||||||
<p>Filter lrzip <b><br>
|
|
||||||
compression</b>=<i>type</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Use <i>type</i> as compression
|
|
||||||
method. Supported values are “bzip2”,
|
|
||||||
“gzipi”, “lzo” (ultra fast), and
|
|
||||||
“zpaq” (best, extremely slow).</p>
|
|
||||||
|
|
||||||
<p><b>compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the lrzip compression level.
|
|
||||||
Supported values are from 1 to 9.</p>
|
|
||||||
|
|
||||||
<p>Filter lz4 <b><br>
|
|
||||||
compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the lz4 compression level.
|
|
||||||
Supported values are from 0 to 9.</p>
|
|
||||||
|
|
||||||
<p><b>stream-checksum</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Enable stream checksum. This is
|
|
||||||
enabled by default.</p>
|
|
||||||
|
|
||||||
<p><b>block-checksum</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Enable block checksum. This is
|
|
||||||
disabled by default.</p>
|
|
||||||
|
|
||||||
<p><b>block-size</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the lz4 compression block size.
|
|
||||||
Supported values are from 4 to 7 (default).</p>
|
|
||||||
|
|
||||||
<p><b>block-dependence</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Use the previous block of the
|
|
||||||
block being compressed for a compression dictionary to
|
|
||||||
improve compression ratio. This is disabled by default.</p>
|
|
||||||
|
|
||||||
<p>Filter lzop <b><br>
|
|
||||||
compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the lzop compression level.
|
|
||||||
Supported values are from 1 to 9.</p>
|
|
||||||
|
|
||||||
<p>Filter uuencode <b><br>
|
|
||||||
mode</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">The value is
|
|
||||||
interpreted as octal digits specifying the file mode.</p>
|
|
||||||
|
|
||||||
<p><b>name</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">The value
|
|
||||||
specifies the file name.</p>
|
|
||||||
|
|
||||||
<p>Filter xz <b><br>
|
|
||||||
compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the compression level. Supported
|
|
||||||
values are from 0 to 9.</p>
|
|
||||||
|
|
||||||
<p><b>threads</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the number of threads for
|
|
||||||
multi-threaded lzma compression. If supported, the default
|
|
||||||
value is read from <b>lzma_cputhreads</b>().</p>
|
|
||||||
|
|
||||||
<p>Filter zstd <b><br>
|
|
||||||
compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the compression level. Supported
|
|
||||||
values depend on the library version, common values are from
|
|
||||||
1 to 22.</p>
|
|
||||||
|
|
||||||
<p>Format 7zip <b><br>
|
|
||||||
compression</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is one of
|
|
||||||
“store”, “deflate”,
|
|
||||||
“bzip2”, “lzma1”,
|
|
||||||
“lzma2” or “ppmd” to indicate how
|
|
||||||
the following entries should be compressed. Note that this
|
|
||||||
setting is ignored for directories, symbolic links, and
|
|
||||||
other special entries.</p>
|
|
||||||
|
|
||||||
<p><b>compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the compression level. Values
|
|
||||||
between 0 and 9 are supported. The interpretation of the
|
|
||||||
compression level depends on the chosen compression
|
|
||||||
method.</p>
|
|
||||||
|
|
||||||
<p>Format bin <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p>Format gnutar <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file,
|
|
||||||
group and user names.</p>
|
|
||||||
|
|
||||||
<p>Format iso9660 - volume metadata</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">These options are used to set
|
|
||||||
standard ISO9660 metadata.</p>
|
|
||||||
|
|
||||||
<p><b>abstract-file</b>=<i>filename</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The file with the specified
|
|
||||||
name will be identified in the ISO9660 metadata as holding
|
|
||||||
the abstract for this volume. Default: none.</p>
|
|
||||||
|
|
||||||
<p><b>application-id</b>=<i>filename</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The file with the specified
|
|
||||||
name will be identified in the ISO9660 metadata as holding
|
|
||||||
the application identifier for this volume. Default:
|
|
||||||
none.</p>
|
|
||||||
|
|
||||||
<p><b>biblio-file</b>=<i>filename</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The file with the specified
|
|
||||||
name will be identified in the ISO9660 metadata as holding
|
|
||||||
the bibliography for this volume. Default: none.</p>
|
|
||||||
|
|
||||||
<p><b>copyright-file</b>=<i>filename</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The file with the specified
|
|
||||||
name will be identified in the ISO9660 metadata as holding
|
|
||||||
the copyright for this volume. Default: none.</p>
|
|
||||||
|
|
||||||
<p><b>publisher</b>=<i>filename</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The file with the specified
|
|
||||||
name will be identified in the ISO9660 metadata as holding
|
|
||||||
the publisher information for this volume. Default:
|
|
||||||
none.</p>
|
|
||||||
|
|
||||||
<p><b>volume-id</b>=<i>string</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The specified string will be
|
|
||||||
used as the Volume Identifier in the ISO9660 metadata. It is
|
|
||||||
limited to 32 bytes. Default: none.</p>
|
|
||||||
|
|
||||||
<p>Format iso9660 - boot support</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">These options are used to make
|
|
||||||
an ISO9660 image that can be directly booted on various
|
|
||||||
systems.</p>
|
|
||||||
|
|
||||||
<p><b>boot</b>=<i>filename</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The file matching this name
|
|
||||||
will be used as the El Torito boot image file.</p>
|
|
||||||
|
|
||||||
<p><b>boot-catalog</b>=<i>name</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The name that will be used for
|
|
||||||
the El Torito boot catalog. Default: <i>boot.catalog</i></p>
|
|
||||||
|
|
||||||
<p><b>boot-info-table</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The boot image file provided by
|
|
||||||
the <b>boot</b>=<i>filename</i> option will be edited with
|
|
||||||
appropriate boot information in bytes 8 through 64. Default:
|
|
||||||
disabled</p>
|
|
||||||
|
|
||||||
<p><b>boot-load-seg</b>=<i>hexadecimal-number</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The load segment for a
|
|
||||||
no-emulation boot image.</p>
|
|
||||||
|
|
||||||
<p><b>boot-load-size</b>=<i>decimal-number</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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 often allow
|
|
||||||
such BIOSes to load the first part of the boot image (which
|
|
||||||
will then need to be intelligent enough 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.</p>
|
|
||||||
|
|
||||||
<p><b>boot-type</b>=<i>value</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Specifies the boot semantics
|
|
||||||
used by the El Torito boot image: If the <i>value</i> is
|
|
||||||
<b>fd</b>, then the boot image is assumed to be a bootable
|
|
||||||
floppy image. If the <i>value</i> is <b>hd</b>, then the
|
|
||||||
boot image is assumed to be a bootable hard disk image. If
|
|
||||||
the <i>value</i> is <b>no-emulation</b>, the boot image is
|
|
||||||
used without floppy or hard disk emulation. If the boot
|
|
||||||
image is exactly 1.2MB, 1.44MB, or 2.88MB, then the default
|
|
||||||
is <b>fd</b>, otherwise the default is
|
|
||||||
<b>no-emulation</b>.</p>
|
|
||||||
|
|
||||||
<p>Format iso9660 - filename and size extensions</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Various extensions to the base
|
|
||||||
ISO9660 format.</p>
|
|
||||||
|
|
||||||
<p><b>allow-ldots</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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 extension area. Default: disabled.</p>
|
|
||||||
|
|
||||||
<p><b>allow-lowercase</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">If enabled, allows filenames to
|
|
||||||
contain lowercase characters. If disabled, filenames will be
|
|
||||||
forced to uppercase. This does not impact names stored in
|
|
||||||
the Rockridge or Joliet extension area. Default:
|
|
||||||
disabled.</p>
|
|
||||||
|
|
||||||
<p><b>allow-multidot</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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: disabled.</p>
|
|
||||||
|
|
||||||
<p><b>allow-period</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">If enabled, allows filenames to
|
|
||||||
contain trailing period characters, in violation of the
|
|
||||||
ISO9660 specification. If disabled, trailing periods will be
|
|
||||||
converted to underscore characters. This does not impact
|
|
||||||
names stored in the Rockridge or Joliet extension area.
|
|
||||||
Default: disabled.</p>
|
|
||||||
|
|
||||||
<p><b>allow-pvd-lowercase</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>allow-sharp-tilde</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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 underscore characters. Default:
|
|
||||||
disabled.</p>
|
|
||||||
|
|
||||||
<p><b>allow-vernum</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">If enabled, version numbers
|
|
||||||
will be included with files. If disabled, version numbers
|
|
||||||
will be suppressed, in violation of the ISO9660 standard.
|
|
||||||
This does not impact names stored in the Rockridge or Joliet
|
|
||||||
extension area. Default: enabled.</p>
|
|
||||||
|
|
||||||
<p><b>iso-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">This enables support for file
|
|
||||||
size and file name extensions in the core ISO9660 area. The
|
|
||||||
name extensions specified here do not affect the names
|
|
||||||
stored in the Rockridge or Joliet extension areas.</p>
|
|
||||||
|
|
||||||
<p><b>iso-level=1</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%;">The most compliant form of
|
|
||||||
ISO9660 image. Filenames are limited to 8.3 uppercase
|
|
||||||
format, directory names are limited to 8 uppercase
|
|
||||||
characters, files are limited to 4 GiB, the complete ISO9660
|
|
||||||
image cannot exceed 4 GiB.</p>
|
|
||||||
|
|
||||||
<p><b>iso-level=2</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>iso-level=3</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%;">As with <b>iso-level=2</b>,
|
|
||||||
except that files may exceed 4 GiB.</p>
|
|
||||||
|
|
||||||
<p><b>iso-level=4</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%;">As with <b>iso-level=3</b>,
|
|
||||||
except that filenames may be up to 193 characters and may
|
|
||||||
include arbitrary 8-bit characters.</p>
|
|
||||||
|
|
||||||
<p><b>joliet</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">Microsoft’s
|
|
||||||
Joliet extensions store a completely separate set of
|
|
||||||
directory information about each file. In particular, this
|
|
||||||
information includes Unicode filenames of up to 255
|
|
||||||
characters. Default: enabled.</p>
|
|
||||||
|
|
||||||
<p><b>limit-depth</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>limit-dirs</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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</p>
|
|
||||||
|
|
||||||
<p><b>pad</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">If enabled, 300
|
|
||||||
kiB of zero bytes will be appended to the end of the
|
|
||||||
archive. Default: enabled</p>
|
|
||||||
|
|
||||||
<p><b>relaxed-filenames</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">If enabled, all 7-bit ASCII
|
|
||||||
characters are permitted in filenames (except lowercase
|
|
||||||
characters unless <b>allow-lowercase</b> is also specified).
|
|
||||||
This violates ISO9660 standards. This does not impact names
|
|
||||||
stored in the Rockridge or Joliet extension area. Default:
|
|
||||||
disabled.</p>
|
|
||||||
|
|
||||||
<p><b>rockridge</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The Rockridge extensions store
|
|
||||||
an additional set of POSIX-style file information with each
|
|
||||||
file, including mtime, atime, ctime, permissions, and long
|
|
||||||
filenames with arbitrary 8-bit characters. These extensions
|
|
||||||
also support symbolic links and other POSIX file types.
|
|
||||||
Default: enabled.</p>
|
|
||||||
|
|
||||||
<p>Format iso9660 - zisofs support</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The zisofs extensions permit
|
|
||||||
each file to be independently compressed using a
|
|
||||||
gzip-compatible compression. This can provide significant
|
|
||||||
size savings, but requires the reading system to have
|
|
||||||
support for these extensions. These extensions are disabled
|
|
||||||
by default.</p>
|
|
||||||
|
|
||||||
<p><b>compression-level</b>=number</p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The compression level used by
|
|
||||||
the deflate compressor. Ranges from 0 (least effort) to 9
|
|
||||||
(most effort). Default: 6</p>
|
|
||||||
|
|
||||||
<p><b>zisofs</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">Synonym for
|
|
||||||
<b>zisofs=direct</b>.</p>
|
|
||||||
|
|
||||||
<p><b>zisofs=direct</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Compress each file in the
|
|
||||||
archive. Unlike <b>zisofs=indirect</b>, 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
|
|
||||||
actually save any space. In particular, files under 2k will
|
|
||||||
never be compressed. Note that boot image files are never
|
|
||||||
compressed.</p>
|
|
||||||
|
|
||||||
<p><b>zisofs=indirect</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Recognizes files that have
|
|
||||||
already been compressed with the <b>mkzftree</b> utility and
|
|
||||||
sets up the necessary file metadata so that readers will
|
|
||||||
correctly identify these as zisofs-compressed files.</p>
|
|
||||||
|
|
||||||
<p><b>zisofs-exclude</b>=<i>filename</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Specifies a filename that
|
|
||||||
should not be compressed when using <b>zisofs=direct</b>.
|
|
||||||
This option can be provided multiple times to suppress
|
|
||||||
compression on many files.</p>
|
|
||||||
|
|
||||||
<p>Format mtree <b><br>
|
|
||||||
cksum</b>, <b>device</b>, <b>flags</b>, <b>gid</b>,
|
|
||||||
<b>gname</b>, <b>indent</b>, <b>link</b>, <b>md5</b>,
|
|
||||||
<b>mode</b>, <b>nlink</b>, <b>rmd160</b>, <b>sha1</b>,
|
|
||||||
<b>sha256</b>, <b>sha384</b>, <b>sha512</b>, <b>size</b>,
|
|
||||||
<b>time</b>, <b>uid</b>, <b>uname</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Enable a particular keyword in
|
|
||||||
the mtree output. Prefix with an exclamation mark to disable
|
|
||||||
the corresponding keyword. The default is equivalent to
|
|
||||||
“device, flags, gid, gname, link, mode, nlink, size,
|
|
||||||
time, type, uid, uname”.</p>
|
|
||||||
|
|
||||||
<p><b>all</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">Enables all of
|
|
||||||
the above keywords.</p>
|
|
||||||
|
|
||||||
<p><b>use-set</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Enables generation of
|
|
||||||
<b>/set</b> lines that specify default values for the
|
|
||||||
following files and/or directories.</p>
|
|
||||||
|
|
||||||
<p><b>indent</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">XXX needs
|
|
||||||
explanation XXX</p>
|
|
||||||
|
|
||||||
<p>Format newc <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p>Format odc <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p>Format pwb <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p>Format pax <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file,
|
|
||||||
group and user names. The value is one of
|
|
||||||
“BINARY” or “UTF-8”. With
|
|
||||||
“BINARY” there is no character conversion, with
|
|
||||||
“UTF-8” names are converted to UTF-8.</p>
|
|
||||||
|
|
||||||
<p><b>xattrheader</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">When storing extended
|
|
||||||
attributes, this option configures which headers should be
|
|
||||||
written. The value is one of “all”,
|
|
||||||
“LIBARCHIVE”, or “SCHILY”. By
|
|
||||||
default, both “LIBARCHIVE.xattr” and
|
|
||||||
“SCHILY.xattr” headers are written.</p>
|
|
||||||
|
|
||||||
<p>Format ustar <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file,
|
|
||||||
group and user names.</p>
|
|
||||||
|
|
||||||
<p>Format v7tar <b><br>
|
|
||||||
hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file,
|
|
||||||
group and user names.</p>
|
|
||||||
|
|
||||||
<p>Format warc <b><br>
|
|
||||||
omit-warcinfo</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Set to “true” to
|
|
||||||
disable output of the warcinfo record.</p>
|
|
||||||
|
|
||||||
<p>Format xar <b><br>
|
|
||||||
checksum</b>=<i>type</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Use <i>type</i> as file
|
|
||||||
checksum method. Supported values are “none”,
|
|
||||||
“md5”, and “sha1” (default).</p>
|
|
||||||
|
|
||||||
<p><b>compression</b>=<i>type</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Use <i>type</i> as compression
|
|
||||||
method. Supported values are “none”,
|
|
||||||
“bzip2”, “gzip” (default),
|
|
||||||
“lzma” and “xz”.</p>
|
|
||||||
|
|
||||||
<p><b>compression_level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is a decimal integer
|
|
||||||
from 1 to 9 specifying the compression level.</p>
|
|
||||||
|
|
||||||
<p><b>toc-checksum</b>=<i>type</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Use <i>type</i> as table of
|
|
||||||
contents checksum method. Supported values are
|
|
||||||
“none”, “md5” and “sha1”
|
|
||||||
(default).</p>
|
|
||||||
|
|
||||||
<p>Format zip <b><br>
|
|
||||||
compression</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">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.</p>
|
|
||||||
|
|
||||||
<p><b>compression-level</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is interpreted as a
|
|
||||||
decimal integer specifying the compression level. Values
|
|
||||||
between 0 and 9 are supported. A compression level of 0
|
|
||||||
switches the compression method to “store”,
|
|
||||||
other values will enable “deflate” compression
|
|
||||||
with the given level.</p>
|
|
||||||
|
|
||||||
<p><b>encryption</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Enable encryption using
|
|
||||||
traditional zip encryption.</p>
|
|
||||||
|
|
||||||
<p><b>encryption</b>=<i>type</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">Use <i>type</i> as encryption
|
|
||||||
type. Supported values are “zipcrypt”
|
|
||||||
(traditional zip encryption), “aes128” (WinZip
|
|
||||||
AES-128 encryption) and “aes256” (WinZip AES-256
|
|
||||||
encryption).</p>
|
|
||||||
|
|
||||||
<p><b>experimental</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">This boolean option enables or
|
|
||||||
disables experimental Zip features that may not be
|
|
||||||
compatible with other Zip implementations.</p>
|
|
||||||
|
|
||||||
<p><b>fakecrc32</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">This boolean option disables
|
|
||||||
CRC calculations. All CRC fields are set to zero. It should
|
|
||||||
not be used except for testing purposes.</p>
|
|
||||||
|
|
||||||
<p><b>hdrcharset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%;">The value is used as a
|
|
||||||
character set name that will be used when translating file
|
|
||||||
names.</p>
|
|
||||||
|
|
||||||
<p><b>zip64</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">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 selectively enables these
|
|
||||||
extensions only as needed. In particular, if the file size
|
|
||||||
is unknown, the Zip writer will include Zip64 extensions to
|
|
||||||
guard against the possibility that the file might be larger
|
|
||||||
than 4 GiB.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">Setting this
|
|
||||||
boolean option will force the writer to use Zip64 extensions
|
|
||||||
even for small files that would not otherwise require them.
|
|
||||||
This is primarily useful for testing.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:27%; margin-top: 1em">Disabling this
|
|
||||||
option with <b>!zip64</b> 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 will not use Zip64
|
|
||||||
extensions for files with unknown size. In particular, this
|
|
||||||
can improve compatibility when generating archives where the
|
|
||||||
entry sizes are not known in advance.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>EXAMPLES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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 <i>kernel.img</i> as the boot image for El
|
|
||||||
Torito booting, and that the gzip compressor should use the
|
|
||||||
maximum compression level.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">a =
|
|
||||||
archive_write_new(); <br>
|
|
||||||
archive_write_add_filter_gzip(a); <br>
|
|
||||||
archive_write_set_format_iso9660(a); <br>
|
|
||||||
archive_write_set_options(a,
|
|
||||||
"boot=kernel.img,compression=9"); <br>
|
|
||||||
archive_write_open_filename(a, filename, blocksize);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ERRORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">More detailed error codes and
|
|
||||||
textual descriptions are available from the
|
|
||||||
<b>archive_errno</b>() and <b>archive_error_string</b>()
|
|
||||||
functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1),
|
|
||||||
archive_read_set_options(3), archive_write(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The options support for
|
|
||||||
libarchive was originally implemented by Michihiro
|
|
||||||
NAKAJIMA.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">BSD January 31, 2020
|
|
||||||
BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,82 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>ARCHIVE_WRITE_SET_PAS... BSD Library Functions Manual
|
|
||||||
ARCHIVE_WRITE_SET_PAS...</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>archive_write_set_passphrase</b>,
|
|
||||||
<b>archive_write_set_passphrase_callback</b> —
|
|
||||||
functions for writing encrypted archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>LIBRARY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Streaming Archive Library
|
|
||||||
(libarchive, -larchive)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>#include
|
|
||||||
<archive.h></b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_set_passphrase</b>(<i>struct archive *</i>,
|
|
||||||
<i>const char *passphrase</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><i>int</i></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p><b>archive_write_set_passphrase_callback</b>(<i>struct archive *</i>,
|
|
||||||
<i>void *client_data</i>,
|
|
||||||
<i>archive_passphrase_callback *</i>);</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION <br>
|
|
||||||
archive_write_set_passphrase</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Set a passphrase for writing an
|
|
||||||
encrypted archive. If <i>passphrase</i> is NULL or empty,
|
|
||||||
this function will do nothing and <b>ARCHIVE_FAILED</b> will
|
|
||||||
be returned. Otherwise, <b>ARCHIVE_OK</b> will be
|
|
||||||
returned.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_passphrase_callback</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Register a callback function
|
|
||||||
that will be invoked to get a passphrase for encryption if
|
|
||||||
the passphrase was not set by the
|
|
||||||
<b>archive_write_set_passphrase</b>() function.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_write(3),
|
|
||||||
archive_write_set_options(3), libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
September 21, 2014 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,521 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:25 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>CPIO(1) BSD General Commands Manual CPIO(1)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>cpio</b> — copy files
|
|
||||||
to and from archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SYNOPSIS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>cpio -i</b> [<i>options</i>]
|
|
||||||
[<i>pattern ...</i>] [<i>< archive</i>] <b><br>
|
|
||||||
cpio -o</b> [<i>options</i>] <i>< name-list</i>
|
|
||||||
[<i>> archive</i>] <b><br>
|
|
||||||
cpio -p</b> [<i>options</i>] <i>dest-dir <
|
|
||||||
name-list</i></p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>cpio</b> 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The first option
|
|
||||||
to <b>cpio</b> is a mode indicator from the following
|
|
||||||
list:</p>
|
|
||||||
|
|
||||||
<p><b>-i</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Input. Read an
|
|
||||||
archive from standard input (unless overridden) and extract
|
|
||||||
the contents to disk or (if the <b>-t</b> 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.</p>
|
|
||||||
|
|
||||||
<p><b>-o</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">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><b>-p</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Pass-through.
|
|
||||||
Read a list of filenames from standard input and copy the
|
|
||||||
files to the specified directory.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>OPTIONS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Unless specifically stated
|
|
||||||
otherwise, options are applicable in all operating
|
|
||||||
modes.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-0</b>, <b>--null</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Read filenames separated by NUL
|
|
||||||
characters instead of newlines. This is necessary if any of
|
|
||||||
the filenames being read might contain newlines.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-6</b>, <b>--pwb</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">When reading a binary format
|
|
||||||
archive, assume it’s the earlier one, from the PWB
|
|
||||||
variant of 6th Edition UNIX. When writing a cpio archive,
|
|
||||||
use the PWB format.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-7</b>, <b>--binary</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(o mode only) When writing a
|
|
||||||
cpio archive, use the (newer, non-PWB) binary format.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-A</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(o mode only)
|
|
||||||
Append to the specified archive. (Not yet implemented.)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-a</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(o and p modes)
|
|
||||||
Reset access times on files after they are read.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-B</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(o mode only)
|
|
||||||
Block output to records of 5120 bytes.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-C</b> <i>size</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(o mode only) Block output to
|
|
||||||
records of <i>size</i> bytes.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-c</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(o mode only)
|
|
||||||
Use the old POSIX portable character format. Equivalent to
|
|
||||||
<b>--format</b> <i>odc</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-d</b>,
|
|
||||||
<b>--make-directories</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i and p modes) Create
|
|
||||||
directories as necessary.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-E</b> <i>file</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i mode only) Read list of file
|
|
||||||
name patterns from <i>file</i> to list and extract.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-F</b> <i>file</i>,
|
|
||||||
<b>--file</b> <i>file</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Read archive from or write
|
|
||||||
archive to <i>file</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-f</b> <i>pattern</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i mode only) Ignore files that
|
|
||||||
match <i>pattern</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-H</b> <i>format</i>,
|
|
||||||
<b>--format</b> <i>format</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(o mode only) Produce the
|
|
||||||
output archive in the specified format. Supported formats
|
|
||||||
include:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>cpio</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Synonym for
|
|
||||||
<i>odc</i>.</p>
|
|
||||||
|
|
||||||
<p><i>newc</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">The SVR4
|
|
||||||
portable cpio format.</p>
|
|
||||||
|
|
||||||
<p><i>odc</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">The old POSIX.1
|
|
||||||
portable octet-oriented cpio format.</p>
|
|
||||||
|
|
||||||
<p><i>pax</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">The POSIX.1 pax
|
|
||||||
format, an extension of the ustar format.</p>
|
|
||||||
|
|
||||||
<p><i>ustar</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">The POSIX.1 tar
|
|
||||||
format.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The default
|
|
||||||
format is <i>odc</i>. See libarchive-formats(5) for more
|
|
||||||
complete information about the formats currently supported
|
|
||||||
by the underlying libarchive(3) library.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-h</b>, <b>--help</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Print usage information.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-I</b> <i>file</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Read archive from
|
|
||||||
<i>file</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-i</b>, <b>--extract</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Input mode. See above for
|
|
||||||
description.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--insecure</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i and p mode only) Disable
|
|
||||||
security checks during extraction or copying. This allows
|
|
||||||
extraction via symbolic links, absolute paths, and path
|
|
||||||
names containing ’..’ in the name.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-J</b>, <b>--xz</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-j</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Synonym for
|
|
||||||
<b>-y</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-L</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-l</b>, <b>--link</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(p mode only) Create links from
|
|
||||||
the target directory to the original files, instead of
|
|
||||||
copying.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--lrzip</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(o mode only) Compress the
|
|
||||||
resulting archive with lrzip(1). In input mode, this option
|
|
||||||
is ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--lz4</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--zstd</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(o mode only)
|
|
||||||
Compress the archive with zstd-compatible compression before
|
|
||||||
writing it. In input mode, this option is ignored; zstd
|
|
||||||
compression is recognized automatically on input.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--lzma</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--lzop</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(o mode only)
|
|
||||||
Compress the resulting archive with lzop(1). In input mode,
|
|
||||||
this option is ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--passphrase</b>
|
|
||||||
<i>passphrase</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The <i>passphrase</i> is used
|
|
||||||
to extract or create an encrypted archive. Currently, zip is
|
|
||||||
only a format that <b>cpio</b> can handle encrypted
|
|
||||||
archives. You shouldn’t use this option unless you
|
|
||||||
realize how insecure use of this option is.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-m</b>,
|
|
||||||
<b>--preserve-modification-time</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i and p modes) Set file
|
|
||||||
modification time on created files to match those in the
|
|
||||||
source.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-n</b>,
|
|
||||||
<b>--numeric-uid-gid</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i mode, only with <b>-t</b>)
|
|
||||||
Display numeric uid and gid. By default, <b>cpio</b>
|
|
||||||
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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--no-preserve-owner</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i mode only) Do not attempt to
|
|
||||||
restore file ownership. This is the default when run by
|
|
||||||
non-root users.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-O</b> <i>file</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Write archive to
|
|
||||||
<i>file</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-o</b>, <b>--create</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Output mode. See above for
|
|
||||||
description.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-p</b>,
|
|
||||||
<b>--pass-through</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Pass-through mode. See above
|
|
||||||
for description.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--preserve-owner</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i mode only) Restore file
|
|
||||||
ownership. This is the default when run by the root
|
|
||||||
user.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--quiet</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Suppress unnecessary
|
|
||||||
messages.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-R</b> [ <br>
|
|
||||||
user][ <br>
|
|
||||||
:][ <br>
|
|
||||||
group], <b>--owner</b> [ <br>
|
|
||||||
user][ <br>
|
|
||||||
:][ <br>
|
|
||||||
group]</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Set the owner and/or group on
|
|
||||||
files in the output. If group is specified with no user (for
|
|
||||||
example, <b>-R</b> <i>:wheel</i>) then the group will be set
|
|
||||||
but not the user. If the user is specified with a trailing
|
|
||||||
colon and no group (for example, <b>-R</b> <i>root:</i>)
|
|
||||||
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 <b>-i</b> and
|
|
||||||
<b>-p</b> modes, this option can only be used by the
|
|
||||||
super-user. (For compatibility, a period can be used in
|
|
||||||
place of the colon.)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-r</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(All modes.)
|
|
||||||
Rename files interactively. For each file, a prompt is
|
|
||||||
written to <i>/dev/tty</i> containing the name of the file
|
|
||||||
and a line is read from <i>/dev/tty</i>. 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-t</b>, <b>--list</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i mode only) List the contents
|
|
||||||
of the archive to stdout; do not restore the contents to
|
|
||||||
disk.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-u</b>,
|
|
||||||
<b>--unconditional</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">(i and p modes) Unconditionally
|
|
||||||
overwrite existing files. Ordinarily, an older file will not
|
|
||||||
overwrite a newer file on disk.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-V</b>, <b>--dot</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Print a dot to stderr for each
|
|
||||||
file as it is processed. Superseded by <b>-v</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-v</b>, <b>--verbose</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Print the name of each file to
|
|
||||||
stderr as it is processed. With <b>-t</b>, provide a
|
|
||||||
detailed listing of each file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>--version</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Print the program version
|
|
||||||
information and exit.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-y</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-Z</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>-z</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">(o mode only)
|
|
||||||
Compress the archive with gzip-compatible compression before
|
|
||||||
writing it. In input mode, this option is ignored; gzip
|
|
||||||
compression is recognized automatically on input.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>EXIT STATUS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>cpio</b> utility
|
|
||||||
exits 0 on success, and >0 if an error
|
|
||||||
occurs.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ENVIRONMENT</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The following environment
|
|
||||||
variables affect the execution of <b>cpio</b>:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">LANG</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">The locale to
|
|
||||||
use. See environ(7) for more information.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">TZ</p>
|
|
||||||
|
|
||||||
<p style="margin-left:21%; margin-top: 1em">The timezone to
|
|
||||||
use when displaying dates. See environ(7) for more
|
|
||||||
information.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>EXAMPLES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>cpio</b> command is
|
|
||||||
traditionally used to copy file hierarchies in conjunction
|
|
||||||
with the find(1) command. The first example here simply
|
|
||||||
copies all files from <i>src</i> to <i>dest</i>:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%;"><b>find</b> <i>src</i> |
|
|
||||||
<b>cpio -pmud</b> <i>dest</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">By carefully
|
|
||||||
selecting options to the find(1) command and combining it
|
|
||||||
with other standard utilities, it is possible to exercise
|
|
||||||
very fine control over which files are copied. This next
|
|
||||||
example copies files from <i>src</i> to <i>dest</i> that are
|
|
||||||
more than 2 days old and whose names match a particular
|
|
||||||
pattern:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%;"><b>find</b> <i>src</i>
|
|
||||||
<b>-mtime</b> <i>+2</i> | <b>grep foo[bar]</b> | <b>cpio
|
|
||||||
-pdmu</b> <i>dest</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">This example
|
|
||||||
copies files from <i>src</i> to <i>dest</i> that are more
|
|
||||||
than 2 days old and which contain the word “</p>
|
|
||||||
|
|
||||||
<p>foobar ”:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%;"><b>find</b> <i>src</i>
|
|
||||||
<b>-mtime</b> <i>+2</i> | <b>xargs grep -l foobar</b> |
|
|
||||||
<b>cpio -pdmu</b> <i>dest</i></p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>COMPATIBILITY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The old POSIX.1
|
|
||||||
standard specified that only <b>-i</b>, <b>-o</b>, and
|
|
||||||
<b>-p</b> were interpreted as command-line options. Each
|
|
||||||
took a single argument of a list of modifier characters. For
|
|
||||||
example, the standard syntax allows <b>-imu</b> but does not
|
|
||||||
support <b>-miu</b> or <b>-i -m -u</b>, since <i>m</i> and
|
|
||||||
<i>u</i> are only modifiers to <b>-i</b>, 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">bzip2(1), gzip(1), mt(1),
|
|
||||||
pax(1), tar(1), libarchive(3), cpio(5),
|
|
||||||
libarchive-formats(5), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>STANDARDS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">There is no current POSIX
|
|
||||||
standard for the cpio command; it appeared in ISO/IEC
|
|
||||||
9945-1:1996 (“POSIX.1”) but was dropped from
|
|
||||||
IEEE Std 1003.1-2001 (“POSIX.1”).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The cpio, ustar,
|
|
||||||
and pax interchange file formats are defined by IEEE Std
|
|
||||||
1003.1-2001 (“POSIX.1”) for the pax command.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The original <b>cpio</b> and
|
|
||||||
<b>find</b> utilities were written by Dick Haight while
|
|
||||||
working in AT&T’s Unix Support Group. They first
|
|
||||||
appeared in 1977 in PWB/UNIX 1.0, the
|
|
||||||
“Programmer’s Work Bench” system developed
|
|
||||||
for use within AT&T. They were first released outside of
|
|
||||||
AT&T as part of System III Unix in 1981. As a result,
|
|
||||||
<b>cpio</b> actually predates <b>tar</b>, even though it was
|
|
||||||
not well-known outside of AT&T until some time
|
|
||||||
later.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">This is a
|
|
||||||
complete re-implementation based on the libarchive(3)
|
|
||||||
library.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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 numbering. Older cpio formats limit the user and group
|
|
||||||
numbers to 16 or 18 bits, which is insufficient for modern
|
|
||||||
systems. The cpio archive formats cannot support files over
|
|
||||||
4 gigabytes, except for the “odc” variant, which
|
|
||||||
can support files up to 8 gigabytes.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
September 16, 2014 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,482 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>CPIO(5) BSD File Formats Manual CPIO(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>cpio</b> — format of
|
|
||||||
cpio archive files</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>cpio</b> archive format
|
|
||||||
collects any number of files, directories, and other file
|
|
||||||
system objects (symbolic links, device nodes, etc.) into a
|
|
||||||
single stream of bytes.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>General
|
|
||||||
Format</b> <br>
|
|
||||||
Each file system object in a <b>cpio</b> 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 generally
|
|
||||||
follow the fields in <i>struct stat</i>. (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!!!”.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>PWB
|
|
||||||
format</b> <br>
|
|
||||||
The PWB binary <b>cpio</b> format is the original format,
|
|
||||||
when cpio was introduced as part of the Programmer’s
|
|
||||||
Work Bench system, a variant of 6th Edition UNIX. It stores
|
|
||||||
numbers as 2-byte and 4-byte binary values. Each entry
|
|
||||||
begins with a header in the following format:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">struct
|
|
||||||
header_pwb_cpio { <br>
|
|
||||||
short h_magic; <br>
|
|
||||||
short h_dev; <br>
|
|
||||||
short h_ino; <br>
|
|
||||||
short h_mode; <br>
|
|
||||||
short h_uid; <br>
|
|
||||||
short h_gid; <br>
|
|
||||||
short h_nlink; <br>
|
|
||||||
short h_majmin; <br>
|
|
||||||
long h_mtime; <br>
|
|
||||||
short h_namesize; <br>
|
|
||||||
long h_filesize; <br>
|
|
||||||
};</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The <i>short</i>
|
|
||||||
fields here are 16-bit integer values, while the <i>long</i>
|
|
||||||
fields are 32 bit integers. Since PWB UNIX, like the 6th
|
|
||||||
Edition UNIX it was based on, only ran on PDP-11 computers,
|
|
||||||
they are in PDP-endian format, which has little-endian
|
|
||||||
shorts, and big-endian longs. That is, the long integer
|
|
||||||
whose hexadecimal representation is 0x12345678 would be
|
|
||||||
stored in four successive bytes as 0x34, 0x12, 0x78, 0x56.
|
|
||||||
The fields are as follows:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_magic</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The integer value octal
|
|
||||||
070707.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_dev</i>, <i>h_ino</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The device and inode numbers
|
|
||||||
from the disk. These are used by programs that read
|
|
||||||
<b>cpio</b> archives to determine when two entries refer to
|
|
||||||
the same file. Programs that synthesize <b>cpio</b> archives
|
|
||||||
should be careful to set these to distinct values for each
|
|
||||||
entry.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_mode</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The mode
|
|
||||||
specifies both the regular permissions and the file type,
|
|
||||||
and it also holds a couple of bits that are irrelevant to
|
|
||||||
the cpio format, because the field is actually a raw copy of
|
|
||||||
the mode field in the inode representing the file. These are
|
|
||||||
the IALLOC flag, which shows that the inode entry is in use,
|
|
||||||
and the ILARG flag, which shows that the file it represents
|
|
||||||
is large enough to have indirect blocks pointers in the
|
|
||||||
inode. The mode is decoded as follows:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">0100000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">IALLOC flag -
|
|
||||||
irrelevant to cpio.</p>
|
|
||||||
|
|
||||||
<p>0060000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">This masks the
|
|
||||||
file type bits.</p>
|
|
||||||
|
|
||||||
<p>0040000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
|
||||||
for directories.</p>
|
|
||||||
|
|
||||||
<p>0020000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
|
||||||
for character special devices.</p>
|
|
||||||
|
|
||||||
<p>0060000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">File type value
|
|
||||||
for block special devices.</p>
|
|
||||||
|
|
||||||
<p>0010000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">ILARG flag -
|
|
||||||
irrelevant to cpio.</p>
|
|
||||||
|
|
||||||
<p>0004000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">SUID bit.</p>
|
|
||||||
|
|
||||||
<p>0002000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">SGID bit.</p>
|
|
||||||
|
|
||||||
<p>0001000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">Sticky bit.</p>
|
|
||||||
|
|
||||||
<p>0000777</p>
|
|
||||||
|
|
||||||
<p style="margin-left:28%; margin-top: 1em">The lower 9
|
|
||||||
bits specify read/write/execute permissions for world,
|
|
||||||
group, and user following standard POSIX conventions.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_uid</i>, <i>h_gid</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The numeric user id and group
|
|
||||||
id of the owner.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_nlink</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The number of links to this
|
|
||||||
file. Directories always have a value of at least two here.
|
|
||||||
Note that hardlinked files include file data with every copy
|
|
||||||
in the archive.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_majmin</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">For block special and character
|
|
||||||
special entries, this field contains the associated device
|
|
||||||
number, with the major number in the high byte, and the
|
|
||||||
minor number in the low byte. For all other entry types, it
|
|
||||||
should be set to zero by writers and ignored by readers.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_mtime</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Modification time of the file,
|
|
||||||
indicated as the number of seconds since the start of the
|
|
||||||
epoch, 00:00:00 UTC January 1, 1970.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_namesize</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The number of bytes in the
|
|
||||||
pathname that follows the header. This count includes the
|
|
||||||
trailing NUL byte.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>h_filesize</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The size of the file. Note that
|
|
||||||
this archive format is limited to 16 megabyte file sizes,
|
|
||||||
because PWB UNIX, like 6th Edition, only used an unsigned 24
|
|
||||||
bit integer for the file size internally.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The pathname
|
|
||||||
immediately follows the fixed header. If <b>h_namesize</b>
|
|
||||||
is odd, an additional NUL byte is added after the pathname.
|
|
||||||
The file data is then appended, again with an additional NUL
|
|
||||||
appended if needed to get the next header at an even
|
|
||||||
offset.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Hardlinked files
|
|
||||||
are not given special treatment; the full file contents are
|
|
||||||
included with each copy of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>New Binary
|
|
||||||
Format</b> <br>
|
|
||||||
The new binary <b>cpio</b> format showed up when cpio was
|
|
||||||
adopted into late 7th Edition UNIX. It is exactly like the
|
|
||||||
PWB binary format, described above, except for three
|
|
||||||
changes:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">First, UNIX now
|
|
||||||
ran on more than one hardware type, so the endianness of 16
|
|
||||||
bit integers must be determined by observing the magic
|
|
||||||
number at the start of the header. The 32 bit integers are
|
|
||||||
still always stored with the most significant word first,
|
|
||||||
though, so each of those two, in the struct shown above, was
|
|
||||||
stored as an array of two 16 bit integers, in the
|
|
||||||
traditional order. Those 16 bit integers, like all the
|
|
||||||
others in the struct, were accessed using a macro that byte
|
|
||||||
swapped them if necessary.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Next, 7th
|
|
||||||
Edition had more file types to store, and the IALLOC and
|
|
||||||
ILARG flag bits were re-purposed to accommodate these. The
|
|
||||||
revised use of the various bits is as follows:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">0170000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">This masks the
|
|
||||||
file type bits.</p>
|
|
||||||
|
|
||||||
<p>0140000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
|
||||||
for sockets.</p>
|
|
||||||
|
|
||||||
<p>0120000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
|
||||||
for symbolic links. For symbolic links, the link body is
|
|
||||||
stored as file data.</p>
|
|
||||||
|
|
||||||
<p>0100000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
|
||||||
for regular files.</p>
|
|
||||||
|
|
||||||
<p>0060000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
|
||||||
for block special devices.</p>
|
|
||||||
|
|
||||||
<p>0040000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
|
||||||
for directories.</p>
|
|
||||||
|
|
||||||
<p>0020000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
|
||||||
for character special devices.</p>
|
|
||||||
|
|
||||||
<p>0010000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">File type value
|
|
||||||
for named pipes or FIFOs.</p>
|
|
||||||
|
|
||||||
<p>0004000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">SUID bit.</p>
|
|
||||||
|
|
||||||
<p>0002000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">SGID bit.</p>
|
|
||||||
|
|
||||||
<p>0001000</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">Sticky bit.</p>
|
|
||||||
|
|
||||||
<p>0000777</p>
|
|
||||||
|
|
||||||
<p style="margin-left:18%; margin-top: 1em">The lower 9
|
|
||||||
bits specify read/write/execute permissions for world,
|
|
||||||
group, and user following standard POSIX conventions.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Finally, the
|
|
||||||
file size field now represents a signed 32 bit integer in
|
|
||||||
the underlying file system, so the maximum file size has
|
|
||||||
increased to 2 gigabytes.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Note that there
|
|
||||||
is no obvious way to tell which of the two binary formats an
|
|
||||||
archive uses, other than to see which one makes more sense.
|
|
||||||
The typical error scenario is that a PWB format archive
|
|
||||||
unpacked as if it were in the new format will create named
|
|
||||||
sockets instead of directories, and then fail to unpack
|
|
||||||
files that should go in those directories. Running
|
|
||||||
<i>bsdcpio -itv</i> on an unknown archive will make it
|
|
||||||
obvious which it is: if it’s PWB format, directories
|
|
||||||
will be listed with an ’s’ instead of a
|
|
||||||
’d’ as the first character of the mode string,
|
|
||||||
and the larger files will have a ’?’ in that
|
|
||||||
position.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Portable
|
|
||||||
ASCII Format</b> <br>
|
|
||||||
Version 2 of the Single UNIX Specification
|
|
||||||
(“SUSv2”) standardized an ASCII variant that is
|
|
||||||
portable across all platforms. It is commonly known as the
|
|
||||||
“old character” format or as the
|
|
||||||
“odc” format. It stores the same numeric fields
|
|
||||||
as the old binary format, but represents them as 6-character
|
|
||||||
or 11-character octal values.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">struct
|
|
||||||
cpio_odc_header { <br>
|
|
||||||
char c_magic[6]; <br>
|
|
||||||
char c_dev[6]; <br>
|
|
||||||
char c_ino[6]; <br>
|
|
||||||
char c_mode[6]; <br>
|
|
||||||
char c_uid[6]; <br>
|
|
||||||
char c_gid[6]; <br>
|
|
||||||
char c_nlink[6]; <br>
|
|
||||||
char c_rdev[6]; <br>
|
|
||||||
char c_mtime[11]; <br>
|
|
||||||
char c_namesize[6]; <br>
|
|
||||||
char c_filesize[11]; <br>
|
|
||||||
};</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The fields are
|
|
||||||
identical to those in the new binary format. The name and
|
|
||||||
file body follow the fixed header. Unlike the binary
|
|
||||||
formats, there is no additional padding after the pathname
|
|
||||||
or file contents. If the files being archived are themselves
|
|
||||||
entirely ASCII, then the resulting archive will be entirely
|
|
||||||
ASCII, except for the NUL byte that terminates the name
|
|
||||||
field.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>New ASCII
|
|
||||||
Format</b> <br>
|
|
||||||
The "new" ASCII format uses 8-byte hexadecimal
|
|
||||||
fields for all numbers and separates device numbers into
|
|
||||||
separate fields for major and minor numbers.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:14%; margin-top: 1em">struct
|
|
||||||
cpio_newc_header { <br>
|
|
||||||
char c_magic[6]; <br>
|
|
||||||
char c_ino[8]; <br>
|
|
||||||
char c_mode[8]; <br>
|
|
||||||
char c_uid[8]; <br>
|
|
||||||
char c_gid[8]; <br>
|
|
||||||
char c_nlink[8]; <br>
|
|
||||||
char c_mtime[8]; <br>
|
|
||||||
char c_filesize[8]; <br>
|
|
||||||
char c_devmajor[8]; <br>
|
|
||||||
char c_devminor[8]; <br>
|
|
||||||
char c_rdevmajor[8]; <br>
|
|
||||||
char c_rdevminor[8]; <br>
|
|
||||||
char c_namesize[8]; <br>
|
|
||||||
char c_check[8]; <br>
|
|
||||||
};</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Except as
|
|
||||||
specified below, the fields here match those specified for
|
|
||||||
the new binary format above.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>magic</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The string
|
|
||||||
“070701”.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>check</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">This field is
|
|
||||||
always set to zero by writers and ignored by readers. See
|
|
||||||
the next section for more details.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The pathname is
|
|
||||||
followed by NUL bytes so that the total size of the fixed
|
|
||||||
header plus pathname is a multiple of four. Likewise, the
|
|
||||||
file data is padded to a multiple of four bytes. Note that
|
|
||||||
this format supports only 4 gigabyte files (unlike the older
|
|
||||||
ASCII format, which supports 8 gigabyte files).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">In this format,
|
|
||||||
hardlinked files are handled by setting the filesize to zero
|
|
||||||
for each entry except the first one that appears in the
|
|
||||||
archive.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>New CRC
|
|
||||||
Format</b> <br>
|
|
||||||
The CRC format is identical to the new ASCII format
|
|
||||||
described in the previous section except that the magic
|
|
||||||
field is set to “070702” and the <i>check</i>
|
|
||||||
field is set to the sum of all bytes in the file data. This
|
|
||||||
sum is computed treating all bytes as unsigned values and
|
|
||||||
using unsigned arithmetic. Only the least-significant 32
|
|
||||||
bits of the sum are stored.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>HP
|
|
||||||
variants</b> <br>
|
|
||||||
The <b>cpio</b> implementation distributed with HPUX used
|
|
||||||
XXXX but stored device numbers differently XXX.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Other
|
|
||||||
Extensions and Variants</b> <br>
|
|
||||||
Sun Solaris uses additional file types to store extended
|
|
||||||
file data, including ACLs and extended attributes, as
|
|
||||||
special entries in cpio archives.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">XXX Others?
|
|
||||||
XXX</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">cpio(1), tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>STANDARDS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>cpio</b> utility is no
|
|
||||||
longer a part of POSIX or the Single Unix Standard. It last
|
|
||||||
appeared in Version 2 of the Single UNIX Specification
|
|
||||||
(“SUSv2”). It has been supplanted in subsequent
|
|
||||||
standards by pax(1). The portable ASCII format is currently
|
|
||||||
part of the specification for the pax(1) utility.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The original cpio utility was
|
|
||||||
written by Dick Haight while working in AT&T’s
|
|
||||||
Unix Support Group. It appeared in 1977 as part of PWB/UNIX
|
|
||||||
1.0, the “Programmer’s Work Bench” derived
|
|
||||||
from Version 6 AT&T UNIX that was used internally
|
|
||||||
at AT&T. Both the new binary and old character formats
|
|
||||||
were in use by 1980, according to the System III source
|
|
||||||
released by SCO under their “Ancient Unix”
|
|
||||||
license. The character format was adopted as part of IEEE
|
|
||||||
Std 1003.1-1988 (“POSIX.1”). XXX when did
|
|
||||||
"newc" appear? Who invented it? When did HP come
|
|
||||||
out with their variant? When did Sun introduce ACLs and
|
|
||||||
extended attributes? XXX</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The “CRC” format is
|
|
||||||
mis-named, as it uses a simple checksum and not a cyclic
|
|
||||||
redundancy check.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The binary
|
|
||||||
formats are limited to 16 bits for user id, group id,
|
|
||||||
device, and inode numbers. They are limited to 16 megabyte
|
|
||||||
and 2 gigabyte file sizes for the older and newer variants,
|
|
||||||
respectively.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The old ASCII
|
|
||||||
format is limited to 18 bits for the user id, group id,
|
|
||||||
device, and inode numbers. It is limited to 8 gigabyte file
|
|
||||||
sizes.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The new ASCII
|
|
||||||
format is limited to 4 gigabyte file sizes.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">None of the cpio
|
|
||||||
formats store user or group names, which are essential when
|
|
||||||
moving files between systems with dissimilar user or group
|
|
||||||
numbering.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Especially when
|
|
||||||
writing older cpio variants, it may be necessary to map
|
|
||||||
actual device/inode values to synthesized values that fit
|
|
||||||
the available fields. With very large filesystems, this may
|
|
||||||
be necessary even for the newer formats.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
December 23, 2011 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,503 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>LIBARCHIVE-FORMATS(5) BSD File Formats Manual
|
|
||||||
LIBARCHIVE-FORMATS(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>libarchive-formats</b>
|
|
||||||
— archive formats supported by the libarchive
|
|
||||||
library</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The libarchive(3) library reads
|
|
||||||
and writes a variety of streaming archive formats. Generally
|
|
||||||
speaking, all of these archive formats consist of a series
|
|
||||||
of “entries”. Each entry stores a single file
|
|
||||||
system object, such as a file, directory, or symbolic
|
|
||||||
link.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The following
|
|
||||||
provides a brief description of each format supported by
|
|
||||||
libarchive, with some information about recognized
|
|
||||||
extensions or limitations of the current library support.
|
|
||||||
Note that just because a format is supported by libarchive
|
|
||||||
does not imply that a program that uses libarchive will
|
|
||||||
support that format. Applications that use libarchive
|
|
||||||
specify which formats they wish to support, though many
|
|
||||||
programs do use libarchive convenience functions to enable
|
|
||||||
all supported formats.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Tar
|
|
||||||
Formats</b> <br>
|
|
||||||
The libarchive(3) library can read most tar archives. It can
|
|
||||||
write POSIX-standard “ustar” and “pax
|
|
||||||
interchange” formats as well as v7 tar format and a
|
|
||||||
subset of the legacy GNU tar format.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">All tar formats
|
|
||||||
store each entry in one or more 512-byte records. The first
|
|
||||||
record is used for file metadata, including filename,
|
|
||||||
timestamp, and mode information, and the file data is stored
|
|
||||||
in subsequent records. Later variants have extended this by
|
|
||||||
either appropriating undefined areas of the header record,
|
|
||||||
extending the header to multiple records, or by storing
|
|
||||||
special entries that modify the interpretation of subsequent
|
|
||||||
entries.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>gnutar</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">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 archives, nor the old GNU long filename
|
|
||||||
format. It can read GNU sparse file entries, including the
|
|
||||||
new POSIX-based formats.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The
|
|
||||||
libarchive(3) library can write GNU tar format, including
|
|
||||||
long filename and linkname support, as well as atime and
|
|
||||||
ctime data.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>pax</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">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 before each regular entry. The
|
|
||||||
presence of these additional entries is the only difference
|
|
||||||
between pax interchange format and the older ustar format.
|
|
||||||
The extended attributes are of unlimited length and are
|
|
||||||
stored as UTF-8 Unicode strings. Keywords defined in the
|
|
||||||
standard are in all lowercase; vendors are allowed to define
|
|
||||||
custom keys by preceding them with the vendor name in all
|
|
||||||
uppercase. When writing pax archives, libarchive uses many
|
|
||||||
of the SCHILY keys defined by Joerg Schilling’s
|
|
||||||
“star” archiver and a few LIBARCHIVE keys. The
|
|
||||||
libarchive library can read most of the SCHILY keys and most
|
|
||||||
of the GNU keys introduced by GNU tar. It silently ignores
|
|
||||||
any keywords that it does not understand.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The pax
|
|
||||||
interchange format converts filenames to Unicode and stores
|
|
||||||
them using the UTF-8 encoding. Prior to libarchive 3.0,
|
|
||||||
libarchive erroneously assumed that the system
|
|
||||||
wide-character routines natively supported Unicode. This
|
|
||||||
caused it to mis-handle non-ASCII filenames on systems that
|
|
||||||
did not satisfy this assumption.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>restricted pax</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The libarchive library can also
|
|
||||||
write pax archives in which it attempts to suppress the
|
|
||||||
extended attributes entry whenever possible. The result will
|
|
||||||
be identical to a ustar archive unless the extended
|
|
||||||
attributes entry is required to store a long file name, long
|
|
||||||
linkname, extended ACL, file flags, or if any of the
|
|
||||||
standard ustar data (user name, group name, UID, GID, etc)
|
|
||||||
cannot be fully represented in the ustar header. In all
|
|
||||||
cases, the result can be dearchived by any program that can
|
|
||||||
read POSIX-compliant pax interchange format archives.
|
|
||||||
Programs that correctly read ustar format (see below) will
|
|
||||||
also be able to read this format; any extended attributes
|
|
||||||
will be extracted as separate files stored in
|
|
||||||
<i>PaxHeader</i> directories.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ustar</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The libarchive
|
|
||||||
library can both read and write this format. This format has
|
|
||||||
the following limitations:</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Device major and minor numbers
|
|
||||||
are limited to 21 bits. Nodes with larger numbers will not
|
|
||||||
be added to the archive.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Path names in the archive are
|
|
||||||
limited to 255 bytes. (Shorter if there is no / character in
|
|
||||||
exactly the right place.)</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Symbolic links and hard links
|
|
||||||
are stored in the archive with the name of the referenced
|
|
||||||
file. This name is limited to 100 bytes.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Extended attributes, file
|
|
||||||
flags, and other extended security information cannot be
|
|
||||||
stored.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Archive entries are limited to
|
|
||||||
8 gigabytes in size.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Note that the pax interchange
|
|
||||||
format has none of these restrictions. The ustar format is
|
|
||||||
old and widely supported. It is recommended when
|
|
||||||
compatibility is the primary concern.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>v7</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The libarchive
|
|
||||||
library can read and write the legacy v7 tar format. This
|
|
||||||
format has the following limitations:</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Only regular files,
|
|
||||||
directories, and symbolic links can be archived. Block and
|
|
||||||
character device nodes, FIFOs, and sockets cannot be
|
|
||||||
archived.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Path names in the archive are
|
|
||||||
limited to 100 bytes.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Symbolic links and hard links
|
|
||||||
are stored in the archive with the name of the referenced
|
|
||||||
file. This name is limited to 100 bytes.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">User and group information are
|
|
||||||
stored as numeric IDs; there is no provision for storing
|
|
||||||
user or group names.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Extended attributes, file
|
|
||||||
flags, and other extended security information cannot be
|
|
||||||
stored.</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">Archive entries are limited to
|
|
||||||
8 gigabytes in size.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Generally, users should prefer
|
|
||||||
the ustar format for portability as the v7 tar format is
|
|
||||||
both less useful and less portable.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The libarchive
|
|
||||||
library also reads a variety of commonly-used extensions to
|
|
||||||
the basic tar format. These extensions are recognized
|
|
||||||
automatically whenever they appear.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Numeric extensions.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The POSIX standards require
|
|
||||||
fixed-length numeric fields to be written with some
|
|
||||||
character position reserved for terminators. Libarchive
|
|
||||||
allows these fields to be written without terminator
|
|
||||||
characters. This extends the allowable range; in particular,
|
|
||||||
ustar archives with this extension can support entries up to
|
|
||||||
64 gigabytes in size. Libarchive also recognizes base-256
|
|
||||||
values in most numeric fields. This essentially removes all
|
|
||||||
limitations on file size, modification time, and device
|
|
||||||
numbers.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Solaris extensions</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Libarchive recognizes ACL and
|
|
||||||
extended attribute records written by Solaris tar.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The first tar
|
|
||||||
program appeared in Seventh Edition Unix in 1979. The first
|
|
||||||
official standard for the tar file format was the
|
|
||||||
“ustar” (Unix Standard Tar) format defined by
|
|
||||||
POSIX in 1988. POSIX.1-2001 extended the ustar format to
|
|
||||||
create the “pax interchange” format.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Cpio
|
|
||||||
Formats</b> <br>
|
|
||||||
The libarchive library can read and write a number of common
|
|
||||||
cpio variants. A cpio archive stores each entry as a
|
|
||||||
fixed-size header followed by a variable-length filename and
|
|
||||||
variable-length data. Unlike the tar format, the cpio format
|
|
||||||
does only minimal padding of the header or file data. There
|
|
||||||
are several cpio variants, which differ primarily in how
|
|
||||||
they store the initial header: some store the values as
|
|
||||||
octal or hexadecimal numbers in ASCII, others as binary
|
|
||||||
values of varying byte order and length.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>binary</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The libarchive
|
|
||||||
library transparently reads both big-endian and
|
|
||||||
little-endian variants of the the two binary cpio formats;
|
|
||||||
the original one from PWB/UNIX, and the later, more widely
|
|
||||||
used, variant. This format used 32-bit binary values for
|
|
||||||
file size and mtime, and 16-bit binary values for the other
|
|
||||||
fields. The formats support only the file types present in
|
|
||||||
UNIX at the time of their creation. File sizes are limited
|
|
||||||
to 24 bits in the PWB format, because of the limits of the
|
|
||||||
file system, and to 31 bits in the newer binary format,
|
|
||||||
where signed 32 bit longs were used.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>odc</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">This is the
|
|
||||||
POSIX standardized format, which is officially known as the
|
|
||||||
“cpio interchange format” or the
|
|
||||||
“octet-oriented cpio archive format” and
|
|
||||||
sometimes unofficially referred to as the “old
|
|
||||||
character format”. This format stores the header
|
|
||||||
contents as octal values in ASCII. It is standard, portable,
|
|
||||||
and immune from byte-order confusion. File sizes and mtime
|
|
||||||
are limited to 33 bits (8GB file size), other fields are
|
|
||||||
limited to 18 bits.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SVR4/newc</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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 limits the
|
|
||||||
mtime and other fields to 32 bits. The SVR4 format can
|
|
||||||
optionally include a CRC of the file contents, although
|
|
||||||
libarchive does not currently verify this CRC.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Cpio first
|
|
||||||
appeared in PWB/UNIX 1.0, which was released within AT&T
|
|
||||||
in 1977. PWB/UNIX 1.0 formed the basis of System III Unix,
|
|
||||||
released outside 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 <b>find</b> and
|
|
||||||
<b>cpio</b> utilities provided very precise control over
|
|
||||||
file selection. Unfortunately, the format has many
|
|
||||||
limitations that make it unsuitable for widespread use. Only
|
|
||||||
the POSIX format permits files over 4GB, and its 18-bit
|
|
||||||
limit for most other fields makes it unsuitable for modern
|
|
||||||
systems. In addition, cpio formats only store numeric
|
|
||||||
UID/GID values (not usernames and group names), which can
|
|
||||||
make it very difficult to correctly transfer archives across
|
|
||||||
systems with dissimilar user numbering.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Shar
|
|
||||||
Formats</b> <br>
|
|
||||||
A “shell archive” is a shell script that, when
|
|
||||||
executed on a POSIX-compliant system, will recreate a
|
|
||||||
collection of file system objects. The libarchive library
|
|
||||||
can write two different kinds of shar archives:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>shar</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">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. However, 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>shardump</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">This format is similar to shar
|
|
||||||
but encodes files using uuencode(1) so that the result will
|
|
||||||
be a plain text file regardless of the file contents. It
|
|
||||||
also includes additional shell commands that attempt to
|
|
||||||
reproduce as many file attributes as possible, including
|
|
||||||
owner, mode, and flags. The additional commands used to
|
|
||||||
restore file attributes make shardump archives less portable
|
|
||||||
than plain shar archives.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>ISO9660
|
|
||||||
format</b> <br>
|
|
||||||
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 also avoids
|
|
||||||
security and complexity issues that come with virtual mounts
|
|
||||||
and loopback devices. Libarchive supports the most common
|
|
||||||
Rockridge extensions and has partial support for Joliet
|
|
||||||
extensions. If both extensions are present, the Joliet
|
|
||||||
extensions will be used and the Rockridge extensions will be
|
|
||||||
ignored. In particular, this can create problems with
|
|
||||||
hardlinks and symlinks, which are supported by Rockridge but
|
|
||||||
not by Joliet.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Libarchive reads
|
|
||||||
ISO9660 images using a streaming strategy. This allows it to
|
|
||||||
read compressed images directly (decompressing on the fly)
|
|
||||||
and allows it to read images directly from network sockets,
|
|
||||||
pipes, and other non-seekable data sources. This strategy
|
|
||||||
works well for optimized ISO9660 images created by many
|
|
||||||
popular programs. Such programs collect all directory
|
|
||||||
information at the beginning of the ISO9660 image so it can
|
|
||||||
be read from a physical disk with a minimum of seeking.
|
|
||||||
However, not all ISO9660 images can be read in this
|
|
||||||
fashion.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Libarchive can
|
|
||||||
also write ISO9660 images. Such images are fully optimized
|
|
||||||
with the directory information preceding all file data. This
|
|
||||||
is done by storing all file data to a temporary file while
|
|
||||||
collecting directory information in memory. When the image
|
|
||||||
is finished, libarchive writes out the directory structure
|
|
||||||
followed by the file data. The location used for the
|
|
||||||
temporary file can be changed by the usual environment
|
|
||||||
variables.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Zip
|
|
||||||
format</b> <br>
|
|
||||||
Libarchive can read and write zip format archives that have
|
|
||||||
uncompressed entries and entries compressed with the
|
|
||||||
“deflate” algorithm. Other zip compression
|
|
||||||
algorithms are not supported. It can extract jar archives,
|
|
||||||
archives that use Zip64 extensions and self-extracting zip
|
|
||||||
archives. Libarchive can use either of two different
|
|
||||||
strategies for reading Zip archives: a streaming strategy
|
|
||||||
which is fast and can handle extremely large archives, and a
|
|
||||||
seeking strategy which can correctly process self-extracting
|
|
||||||
Zip archives and archives with deleted members or other
|
|
||||||
in-place modifications.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The streaming
|
|
||||||
reader processes Zip archives as they are read. It can read
|
|
||||||
archives of arbitrary size from tape or network sockets, and
|
|
||||||
can decode Zip archives that have been separately compressed
|
|
||||||
or encoded. However, self-extracting Zip archives and
|
|
||||||
archives with certain types of modifications cannot be
|
|
||||||
correctly handled. Such archives require that the reader
|
|
||||||
first process the Central Directory, which is ordinarily
|
|
||||||
located at the end of a Zip archive and is thus inaccessible
|
|
||||||
to the streaming reader. If the program using libarchive has
|
|
||||||
enabled seek support, then libarchive will use this to
|
|
||||||
processes the central directory first.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">In particular,
|
|
||||||
the seeking reader must be used to correctly handle
|
|
||||||
self-extracting archives. Such archives consist of a program
|
|
||||||
followed by a regular Zip archive. The streaming reader
|
|
||||||
cannot parse the initial program portion, but the seeking
|
|
||||||
reader starts by reading the Central Directory from the end
|
|
||||||
of the archive. Similarly, Zip archives that have been
|
|
||||||
modified in-place can have deleted entries or other garbage
|
|
||||||
data that can only be accurately detected by first reading
|
|
||||||
the Central Directory.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Archive
|
|
||||||
(library) file format</b> <br>
|
|
||||||
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 standardised. There are
|
|
||||||
two common variants: the GNU format derived from SVR4, and
|
|
||||||
the BSD format, which first appeared in 4.4BSD. The two
|
|
||||||
differ primarily in their handling of filenames longer than
|
|
||||||
15 characters: the GNU/SVR4 variant writes a filename table
|
|
||||||
at the beginning of the archive; 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 <i>//</i> 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>mtree</b>
|
|
||||||
<br>
|
|
||||||
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 specific metadata about that
|
|
||||||
file. Libarchive can read all of the keywords supported by
|
|
||||||
both the NetBSD and FreeBSD versions of mtree(8), although
|
|
||||||
many of the keywords cannot currently be stored in an
|
|
||||||
archive_entry object. When writing, libarchive supports use
|
|
||||||
of the archive_write_set_options(3) interface to specify
|
|
||||||
which keywords should be included in the output. If
|
|
||||||
libarchive was compiled with access to suitable
|
|
||||||
cryptographic libraries (such as the OpenSSL libraries), it
|
|
||||||
can compute hash entries such as <b>sha512</b> or <b>md5</b>
|
|
||||||
from file data being written to the mtree writer.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">When reading an
|
|
||||||
mtree file, libarchive will locate the corresponding files
|
|
||||||
on disk using the <b>contents</b> keyword if present or the
|
|
||||||
regular filename. 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>7-Zip</b>
|
|
||||||
<br>
|
|
||||||
Libarchive can read and write 7-Zip format archives. TODO:
|
|
||||||
Need more information</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>CAB</b> <br>
|
|
||||||
Libarchive can read Microsoft Cabinet ( “CAB”)
|
|
||||||
format archives. TODO: Need more information.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>LHA</b> <br>
|
|
||||||
TODO: Information about libarchive’s LHA support</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>RAR</b> <br>
|
|
||||||
Libarchive has limited support for reading RAR format
|
|
||||||
archives. Currently, 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Warc</b> <br>
|
|
||||||
Libarchive can read and write “web archives”.
|
|
||||||
TODO: Need more information</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>XAR</b> <br>
|
|
||||||
Libarchive can read and write the XAR format used by many
|
|
||||||
Apple tools. TODO: Need more information</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">ar(1), cpio(1), mkisofs(1),
|
|
||||||
shar(1), tar(1), zip(1), zlib(3), cpio(5), mtree(5),
|
|
||||||
tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
December 27, 2016 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,328 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>LIBARCHIVE(3) BSD Library Functions Manual
|
|
||||||
LIBARCHIVE(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>libarchive</b> —
|
|
||||||
functions for reading and writing streaming archives</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>OVERVIEW</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
provides a flexible interface for reading and writing
|
|
||||||
archives in various formats such as tar and cpio.
|
|
||||||
<b>libarchive</b> also supports reading and writing archives
|
|
||||||
compressed using various compression filters such as gzip
|
|
||||||
and bzip2. The library is inherently stream-oriented;
|
|
||||||
readers serially iterate through the archive, writers
|
|
||||||
serially add things to the archive. In particular, note that
|
|
||||||
there is currently no built-in support for random access nor
|
|
||||||
for in-place modification.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">When reading an
|
|
||||||
archive, the library automatically detects the format and
|
|
||||||
the compression. The library currently has read support
|
|
||||||
for:</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">old-style tar archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">most variants of the POSIX
|
|
||||||
“ustar” format,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">the POSIX “pax
|
|
||||||
interchange” format,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">GNU-format tar archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">most common cpio archive
|
|
||||||
formats,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">7-Zip archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">ar archives (including GNU/SysV
|
|
||||||
and BSD extensions),</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">Microsoft CAB archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">ISO9660 CD images (including
|
|
||||||
RockRidge and Joliet extensions),</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">LHA archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">mtree file tree
|
|
||||||
descriptions,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">RAR and most RAR5 archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">WARC archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">XAR archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">Zip archives.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The library automatically
|
|
||||||
detects archives compressed with compress(1), bzip2(1),
|
|
||||||
grzip(1), gzip(1), lrzip(1), lz4(1), lzip(1), lzop(1),
|
|
||||||
xz(1), or zstd(1) and decompresses them transparently.
|
|
||||||
Decompression of some formats requires external decompressor
|
|
||||||
utilities. It can similarly detect and decode archives
|
|
||||||
processed with uuencode(1) or which have an rpm(1)
|
|
||||||
header.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">When writing an
|
|
||||||
archive, you can specify the compression to be used and the
|
|
||||||
format to use. The library can write</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">POSIX-standard
|
|
||||||
“ustar” archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">POSIX “pax interchange
|
|
||||||
format” archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">cpio archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">7-Zip archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">ar archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">two different variants of shar
|
|
||||||
archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">ISO9660 CD images,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">mtree file tree
|
|
||||||
descriptions,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">XAR archives,</p>
|
|
||||||
|
|
||||||
<p><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:12%;">Zip archive.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Pax interchange format is an
|
|
||||||
extension of the tar archive format that eliminates
|
|
||||||
essentially all of the limitations of historic tar formats
|
|
||||||
in a standard fashion that is supported by POSIX-compliant
|
|
||||||
pax(1) implementations on many systems as well as several
|
|
||||||
newer implementations of tar(1). Note that the default write
|
|
||||||
format will suppress the pax extended attributes for most
|
|
||||||
entries; explicitly requesting pax format will enable those
|
|
||||||
attributes for all entries.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The read and
|
|
||||||
write APIs are accessed through the
|
|
||||||
<b>archive_read_XXX</b>() functions and the
|
|
||||||
<b>archive_write_XXX</b>() functions, respectively, and
|
|
||||||
either can be used independently of the other.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The rest of this
|
|
||||||
manual page provides an overview of the library operation.
|
|
||||||
More detailed information can be found in the individual
|
|
||||||
manual pages for each API or utility function.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>READING AN ARCHIVE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">See archive_read(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>WRITING AN ARCHIVE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">See archive_write(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>WRITING ENTRIES TO
|
|
||||||
DISK</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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
|
|
||||||
<b>archive_read_extract</b>(); using it directly can provide
|
|
||||||
greater control over how entries get written to disk. This
|
|
||||||
API also makes it possible to share code between
|
|
||||||
archive-to-archive copy and archive-to-disk extraction
|
|
||||||
operations.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>READING ENTRIES FROM
|
|
||||||
DISK</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The archive_read_disk(3)
|
|
||||||
supports for populating archive_entry(3) objects from
|
|
||||||
information in the filesystem. This includes the information
|
|
||||||
accessible from the stat(2) system call as well as ACLs,
|
|
||||||
extended attributes, and other metadata. The
|
|
||||||
archive_read_disk(3) API also supports iterating over
|
|
||||||
directory trees, which allows directories of files to be
|
|
||||||
read using an API compatible with the archive_read(3)
|
|
||||||
API.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Detailed descriptions of each
|
|
||||||
function are provided by the corresponding manual pages.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">All of the
|
|
||||||
functions utilize an opaque struct archive datatype that
|
|
||||||
provides access to the archive contents.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The struct
|
|
||||||
archive_entry structure contains a complete description of a
|
|
||||||
single archive entry. It uses an opaque interface that is
|
|
||||||
fully documented in archive_entry(3).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Users familiar
|
|
||||||
with historic formats should be aware that the newer
|
|
||||||
variants have eliminated most restrictions on the length of
|
|
||||||
textual fields. Clients should not assume that filenames,
|
|
||||||
link names, user names, or group names are limited in
|
|
||||||
length. In particular, pax interchange format can easily
|
|
||||||
accommodate pathnames in arbitrary character sets that
|
|
||||||
exceed <i>PATH_MAX</i>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>RETURN VALUES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">Most functions return
|
|
||||||
<b>ARCHIVE_OK</b> (zero) on success, non-zero on error. The
|
|
||||||
return value indicates the general severity of the error,
|
|
||||||
ranging from <b>ARCHIVE_WARN</b>, which indicates a minor
|
|
||||||
problem that should probably be reported to the user, to
|
|
||||||
<b>ARCHIVE_FATAL</b>, which indicates a serious problem that
|
|
||||||
will prevent any further operations on this archive. On
|
|
||||||
error, the <b>archive_errno</b>() function can be used to
|
|
||||||
retrieve a numeric error code (see errno(2)). The
|
|
||||||
<b>archive_error_string</b>() returns a textual error
|
|
||||||
message suitable for display.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_new</b>()
|
|
||||||
and <b>archive_write_new</b>() return pointers to an
|
|
||||||
allocated and initialized struct archive object.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>archive_read_data</b>()
|
|
||||||
and <b>archive_write_data</b>() 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 <b>archive_errno</b>()
|
|
||||||
and <b>archive_error_string</b>() functions can be used to
|
|
||||||
obtain more information.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ENVIRONMENT</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">There are character set
|
|
||||||
conversions within the archive_entry(3) functions that are
|
|
||||||
impacted by the currently-selected locale.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">tar(1), archive_entry(3),
|
|
||||||
archive_read(3), archive_util(3), archive_write(3),
|
|
||||||
tar(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was originally written by Tim Kientzle
|
|
||||||
<kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>BUGS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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 sets, or the arbitrary key/value pairs that can
|
|
||||||
appear in pax interchange format archives.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Conversely, of
|
|
||||||
course, not all of the information that can be stored in an
|
|
||||||
struct archive_entry is supported by all formats. For
|
|
||||||
example, cpio formats do not support nanosecond timestamps;
|
|
||||||
old tar formats do not support large device numbers.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The ISO9660
|
|
||||||
reader cannot yet read all ISO9660 images; it should learn
|
|
||||||
how to seek.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The AR writer
|
|
||||||
requires the client program to use two passes, unlike all
|
|
||||||
other libarchive writers.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
March 18, 2012 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,464 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>LIBARCHIVE_CHANGES(3) BSD Library Functions Manual
|
|
||||||
LIBARCHIVE_CHANGES(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>libarchive_changes</b>
|
|
||||||
— changes in libarchive interface</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>CHANGES IN LIBARCHIVE
|
|
||||||
3</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">This page describes user-visible
|
|
||||||
changes in libarchive3, and lists public functions and other
|
|
||||||
symbols changed, deprecated or removed in libarchive3, along
|
|
||||||
with their replacements if any.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Multiple
|
|
||||||
Filters</b> <br>
|
|
||||||
Libarchive2 permitted a single (input or output) filter
|
|
||||||
active on an archive. Libarchive3 extends this into a
|
|
||||||
variable-length stack. Where
|
|
||||||
<b>archive_write_set_compression_XXX</b>() would replace any
|
|
||||||
existing filter, <b>archive_write_add_filter_XXX</b>()
|
|
||||||
extends the write pipeline with another filter.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Character Set
|
|
||||||
Handling</b> <br>
|
|
||||||
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 archives were written
|
|
||||||
incorrectly on some systems, since pax format requires UTF-8
|
|
||||||
and libarchive 2 incorrectly assumed that wchar_t strings
|
|
||||||
can be easily converted to UTF-8.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Libarchive3 uses
|
|
||||||
the standard iconv library to convert between character sets
|
|
||||||
and is introducing the notion of a “default character
|
|
||||||
set for the archive”. To support this, archive_entry
|
|
||||||
objects can now be bound to a particular archive when they
|
|
||||||
are created. The automatic character set conversions
|
|
||||||
performed by archive_entry objects when reading and writing
|
|
||||||
filenames, usernames, and other strings will now use an
|
|
||||||
appropriate default character set:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">If the
|
|
||||||
archive_entry object is bound to an archive, it will use the
|
|
||||||
default character set for that archive.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The platform
|
|
||||||
default character encoding (as returned by
|
|
||||||
<b>nl_langinfo</b>(<i>CHARSET</i>)) will be used if nothing
|
|
||||||
else is specified.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Libarchive3 also
|
|
||||||
introduces charset options to many of the archive readers
|
|
||||||
and writers to control the character set that will be used
|
|
||||||
for filenames written in those archives. When possible, this
|
|
||||||
will be set automatically based on information in the
|
|
||||||
archive itself. Combining this with the notion of a default
|
|
||||||
character set for the archive should allow you to configure
|
|
||||||
libarchive to read archives from other platforms and have
|
|
||||||
the filenames and other information transparently converted
|
|
||||||
to the character encoding suitable for your application.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Prototype
|
|
||||||
Changes</b> <br>
|
|
||||||
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, gid_t, uid_t, and
|
|
||||||
ino_t.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">There are a few
|
|
||||||
cases where these changes will affect your source code:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">In some cases,
|
|
||||||
libarchive’s wider types will introduce the
|
|
||||||
possibility 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>•</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">Typedef function pointer types
|
|
||||||
will be incompatible. For example, if you define custom skip
|
|
||||||
callbacks, you may have to use code similar to the following
|
|
||||||
if you want to support building against libarchive2 and
|
|
||||||
libarchive3:</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%; margin-top: 1em">#if
|
|
||||||
ARCHIVE_VERSION_NUMBER < 3000000 <br>
|
|
||||||
typedef off_t myoff_t; <br>
|
|
||||||
#else <br>
|
|
||||||
typedef int64_t myoff_t; <br>
|
|
||||||
#endif</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%; margin-top: 1em">myoff_t <br>
|
|
||||||
my_skip_function(struct archive *a, void *v, myoff_t o) <br>
|
|
||||||
{ <br>
|
|
||||||
... implementation ... <br>
|
|
||||||
}</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Affected
|
|
||||||
functions:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>• <br>
|
|
||||||
archive_entry_gid</b>(), <b>archive_entry_set_gid</b>()
|
|
||||||
<b><br>
|
|
||||||
• <br>
|
|
||||||
archive_entry_uid</b>(), <b>archive_entry_set_uid</b>()
|
|
||||||
<b><br>
|
|
||||||
• <br>
|
|
||||||
archive_entry_ino</b>(), <b>archive_entry_set_ino</b>()
|
|
||||||
<b><br>
|
|
||||||
• <br>
|
|
||||||
archive_read_data_block</b>(),
|
|
||||||
<b>archive_write_data_block</b>() <b><br>
|
|
||||||
• <br>
|
|
||||||
archive_read_disk_gname</b>(),
|
|
||||||
<b>archive_read_disk_uname</b>() <b><br>
|
|
||||||
• <br>
|
|
||||||
archive_read_disk_set_gname_lookup</b>(),
|
|
||||||
<b>archive_read_disk_set_group_lookup</b>(),
|
|
||||||
<b>archive_read_disk_set_uname_lookup</b>(),
|
|
||||||
<b>archive_read_disk_set_user_lookup</b>() <b><br>
|
|
||||||
•</b></p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:12%;"><b>archive_skip_callback</b>()</p>
|
|
||||||
|
|
||||||
<p><b>• <br>
|
|
||||||
archive_read_extract_set_skip_file</b>(),
|
|
||||||
<b>archive_write_disk_set_skip_file</b>(),
|
|
||||||
<b>archive_write_set_skip_file</b>() <b><br>
|
|
||||||
• <br>
|
|
||||||
archive_write_disk_set_group_lookup</b>(),
|
|
||||||
<b>archive_write_disk_set_user_lookup</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Deprecated
|
|
||||||
Symbols</b> <br>
|
|
||||||
Symbols deprecated in libarchive3 will be removed in
|
|
||||||
libarchive4. These symbols, along with their replacements if
|
|
||||||
any, are listed below:</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_position_compressed</b>(),
|
|
||||||
<b>archive_position_uncompressed</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_filter_bytes</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_compression</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_filter_code</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_compression_name</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_filter_name</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_finish</b>(),
|
|
||||||
<b>archive_write_finish</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_free</b>(),
|
|
||||||
<b>archive_write_free</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_open_file</b>(),
|
|
||||||
<b>archive_write_open_file</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_open_filename</b>(),
|
|
||||||
<b>archive_write_open_filename</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_all</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_all</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_bzip2</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_bzip2</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_compress</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_compress</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_gzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_gzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_lzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_lzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_lzma</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_lzma</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_none</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_none</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_program</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_program</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_program_signature</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_program_signature</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_rpm</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_rpm</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_uu</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_uu</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_support_compression_xz</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_support_filter_xz</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_bzip2</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_bzip2</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_compress</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_compress</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_gzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_gzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_lzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_lzip</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_lzma</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_lzma</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_none</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_none</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_program</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_program</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_compression_filter</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_add_filter_filter</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Removed
|
|
||||||
Symbols</b> <br>
|
|
||||||
These symbols, listed below along with their replacements if
|
|
||||||
any, were deprecated in libarchive2, and are not part of
|
|
||||||
libarchive3.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_api_feature</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_version_number</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_api_version</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_version_number</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_version</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_version_string</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_version_stamp</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_version_number</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_set_filter_options</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_set_options</b>()
|
|
||||||
or <b>archive_read_set_filter_option</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_read_set_format_options</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_read_set_options</b>()
|
|
||||||
or <b>archive_read_set_format_option</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_filter_options</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_set_options</b>()
|
|
||||||
or <b>archive_write_set_filter_option</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>archive_write_set_format_options</b>()</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:13%;"><b>archive_write_set_options</b>()
|
|
||||||
or <b>archive_write_set_format_option</b>()</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_API_FEATURE</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_API_VERSION</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_VERSION_STAMP</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_VERSION_NUMBER</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_LIBRARY_VERSION</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_VERSION_STRING</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_NONE</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_NONE</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_GZIP</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_GZIP</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_BZIP2</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_BZIP2</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_COMPRESS</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_COMPRESS</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_PROGRAM</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_PROGRAM</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_LZMA</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_LZMA</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_XZ</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_XZ</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_UU</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_UU</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_RPM</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_RPM</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_COMPRESSION_LZIP</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">ARCHIVE_FILTER_LZIP</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_BYTES_PER_RECORD</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">512</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">ARCHIVE_DEFAULT_BYTES_PER_BLOCK</p>
|
|
||||||
|
|
||||||
<p style="margin-left:13%;">10240</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_read(3),
|
|
||||||
archive_read_filter(3), archive_read_format(3),
|
|
||||||
archive_read_set_options(3), archive_util(3),
|
|
||||||
archive_write(3), archive_write_filter(3),
|
|
||||||
archive_write_format(3), archive_write_set_options(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
December 23, 2011 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,374 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>LIBARCHIVE_INTERNALS(3) BSD Library Functions Manual
|
|
||||||
LIBARCHIVE_INTERNALS(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>libarchive_internals</b>
|
|
||||||
— description of libarchive internal interfaces</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>OVERVIEW</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> 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 archive and compression formats.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>GENERAL ARCHITECTURE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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 write archive_entry(3) objects to archive
|
|
||||||
files, read them from archive files, and write them to disk.
|
|
||||||
(There are plans to add a facility to read archive_entry(3)
|
|
||||||
objects from disk as well.)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The read and
|
|
||||||
write APIs each have four layers: a public API layer, a
|
|
||||||
format layer that understands the archive file format, a
|
|
||||||
compression layer, and an I/O layer. The I/O layer is
|
|
||||||
completely exposed to clients who can replace it entirely
|
|
||||||
with their own functions.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">In order to
|
|
||||||
provide as much consistency as possible for clients, some
|
|
||||||
public functions are virtualized. Eventually, it should be
|
|
||||||
possible for 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>READ ARCHITECTURE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">From the outside, clients use
|
|
||||||
the archive_read(3) API to manipulate an <b>archive</b>
|
|
||||||
object to read entries and bodies from an archive stream.
|
|
||||||
Internally, the <b>archive</b> object is cast to an
|
|
||||||
<b>archive_read</b> 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 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 creates <b>archive_entry</b> objects from the
|
|
||||||
incoming data. The API layer tracks overall state (for
|
|
||||||
example, it prevents clients from reading data before
|
|
||||||
reading a header) and invokes the format and compression
|
|
||||||
layer operations through registered function pointers. In
|
|
||||||
particular, the API layer drives the format-detection
|
|
||||||
process: When opening the archive, it reads an initial block
|
|
||||||
of data and offers it to each registered compression
|
|
||||||
handler. The one with the highest bid is initialized with
|
|
||||||
the first block. Similarly, the format handlers are polled
|
|
||||||
to see which handler is the best for each archive. (Prior to
|
|
||||||
2.4.0, the format bidders were invoked for each entry, but
|
|
||||||
this design hindered error recovery.)</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>I/O Layer and
|
|
||||||
Client Callbacks</b> <br>
|
|
||||||
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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The client read
|
|
||||||
callback is expected to provide a block of data on each
|
|
||||||
call. A zero-length return does indicate end of file, but
|
|
||||||
otherwise blocks may be as small as one byte or as large as
|
|
||||||
the entire file. In particular, blocks may be of different
|
|
||||||
sizes.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">The client skip
|
|
||||||
callback returns the number of bytes actually skipped, which
|
|
||||||
may be much smaller than the skip requested. The only
|
|
||||||
requirement is that the skip not be larger. In particular,
|
|
||||||
clients are allowed to return zero for any skip that they
|
|
||||||
don’t want to handle. The skip callback must never be
|
|
||||||
invoked with a negative value.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Keep in mind
|
|
||||||
that not all clients are reading from disk: clients reading
|
|
||||||
from networks may provide different-sized blocks on every
|
|
||||||
request and cannot skip at all; advanced clients may use
|
|
||||||
mmap(2) to read the entire file into memory at once and
|
|
||||||
return the entire file to libarchive as a single block;
|
|
||||||
other clients may begin asynchronous I/O operations for the
|
|
||||||
next block on each request.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Decompresssion
|
|
||||||
Layer</b> <br>
|
|
||||||
The decompression layer not only handles decompression, it
|
|
||||||
also buffers data so that the format handlers see a much
|
|
||||||
nicer I/O model. The decompression API is a two stage
|
|
||||||
peek/consume model. A read_ahead request specifies a minimum
|
|
||||||
read amount; the decompression layer must provide a pointer
|
|
||||||
to at least that much data. If more data is immediately
|
|
||||||
available, it should return more: the format layer handles
|
|
||||||
bulk data reads by asking for a minimum of one byte and then
|
|
||||||
copying as much data as is available.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">A subsequent
|
|
||||||
call to the <b>consume</b>() function advances the read
|
|
||||||
pointer. Note that data returned from a <b>read_ahead</b>()
|
|
||||||
call is guaranteed to remain in place until the next call to
|
|
||||||
<b>read_ahead</b>(). Intervening calls to <b>consume</b>()
|
|
||||||
should not cause the data to move.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Skip requests
|
|
||||||
must always be handled exactly. Decompression handlers that
|
|
||||||
cannot seek forward should not register a skip handler; the
|
|
||||||
API layer fills in a generic skip handler that reads and
|
|
||||||
discards data.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">A decompression
|
|
||||||
handler has a specific lifecycle:</p>
|
|
||||||
|
|
||||||
<p>Registration/Configuration</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">When the client invokes the
|
|
||||||
public support function, the decompression handler invokes
|
|
||||||
the internal <b>__archive_read_register_compression</b>()
|
|
||||||
function to provide bid and initialization functions. This
|
|
||||||
function returns <b>NULL</b> on error or else a pointer to a
|
|
||||||
<b>struct decompressor_t</b>. This structure contains a
|
|
||||||
<i>void * config</i> slot that can be used for storing any
|
|
||||||
customization information.</p>
|
|
||||||
|
|
||||||
<p>Bid</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The bid
|
|
||||||
function is invoked with a pointer and size of a block of
|
|
||||||
data. The decompressor can access its config data through
|
|
||||||
the <i>decompressor</i> element of the <b>archive_read</b>
|
|
||||||
object. The bid function is otherwise stateless. In
|
|
||||||
particular, it must not perform any I/O operations.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The value
|
|
||||||
returned by the bid function indicates its suitability for
|
|
||||||
handling this data stream. A bid of zero will ensure that
|
|
||||||
this decompressor is never invoked. Return zero if magic
|
|
||||||
number checks fail. Otherwise, your initial implementation
|
|
||||||
should return the number of bits actually checked. For
|
|
||||||
example, if you verify two full bytes and three bits of
|
|
||||||
another byte, bid 19. Note that the initial block may be
|
|
||||||
very short; be careful to only inspect the data you are
|
|
||||||
given. (The current decompressors require two bytes for
|
|
||||||
correct bidding.)</p>
|
|
||||||
|
|
||||||
<p>Initialize</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The winning bidder will have
|
|
||||||
its init function called. This function should initialize
|
|
||||||
the remaining slots of the <i>struct decompressor_t</i>
|
|
||||||
object pointed to by the <i>decompressor</i> element of the
|
|
||||||
<i>archive_read</i> object. In particular, it should
|
|
||||||
allocate any working data it needs in the <i>data</i> 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.</p>
|
|
||||||
|
|
||||||
<p>Satisfy I/O requests</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The format handler will invoke
|
|
||||||
the <i>read_ahead</i>, <i>consume</i>, and <i>skip</i>
|
|
||||||
functions as needed.</p>
|
|
||||||
|
|
||||||
<p>Finish</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">The finish
|
|
||||||
method is called only once when the archive is closed. It
|
|
||||||
should release anything stored in the <i>data</i> and
|
|
||||||
<i>config</i> slots of the <i>decompressor</i> object. It
|
|
||||||
should not invoke the client close callback.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Format
|
|
||||||
Layer</b> <br>
|
|
||||||
The read formats have a similar lifecycle to the
|
|
||||||
decompression handlers:</p>
|
|
||||||
|
|
||||||
<p>Registration</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">Allocate your private data and
|
|
||||||
initialize your pointers.</p>
|
|
||||||
|
|
||||||
<p>Bid</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%; margin-top: 1em">Formats bid by
|
|
||||||
invoking the <b>read_ahead</b>() decompression method but
|
|
||||||
not calling the <b>consume</b>() 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 require a few hundred bytes of look ahead;
|
|
||||||
look aheads of a few kilobytes are reasonable. (The ISO9660
|
|
||||||
reader sometimes looks ahead by 48k, which should be
|
|
||||||
considered an upper limit.)</p>
|
|
||||||
|
|
||||||
<p>Read header</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The header read is usually the
|
|
||||||
most complex part of any format. There are a few strategies
|
|
||||||
worth mentioning: For formats such as tar or cpio, reading
|
|
||||||
and parsing the header is straightforward since headers
|
|
||||||
alternate with data. For formats that store all header data
|
|
||||||
at the beginning of the file, the first header read request
|
|
||||||
may have to read all headers into memory and store that
|
|
||||||
data, sorted by the location of the file data. Subsequent
|
|
||||||
header read requests will skip forward to the beginning of
|
|
||||||
the file data and return the corresponding header.</p>
|
|
||||||
|
|
||||||
<p>Read Data</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">The read data interface
|
|
||||||
supports sparse files; this requires that each call return a
|
|
||||||
block of data specifying the file offset and size. This may
|
|
||||||
require you to carefully track the location so that you can
|
|
||||||
return accurate file offsets for each read. Remember that
|
|
||||||
the decompressor will return as much data as it has.
|
|
||||||
Generally, you will want to request one byte, examine the
|
|
||||||
return value to see how much data is available, and possibly
|
|
||||||
trim that to the amount you can use. You should invoke
|
|
||||||
consume for each block just before you return it.</p>
|
|
||||||
|
|
||||||
<p>Skip All Data</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">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 <b>data_skip</b>() function.</p>
|
|
||||||
|
|
||||||
<p>Cleanup</p>
|
|
||||||
|
|
||||||
<p style="margin-left:17%;">On cleanup, the format should
|
|
||||||
release all of its allocated memory.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>API Layer</b>
|
|
||||||
<br>
|
|
||||||
XXX to do XXX</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>WRITE ARCHITECTURE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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
|
|
||||||
registered at a time.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>I/O Layer and
|
|
||||||
Client Callbacks</b> <br>
|
|
||||||
XXX To be written XXX</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Compression
|
|
||||||
Layer</b> <br>
|
|
||||||
XXX To be written XXX</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Format
|
|
||||||
Layer</b> <br>
|
|
||||||
XXX To be written XXX</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>API Layer</b>
|
|
||||||
<br>
|
|
||||||
XXX To be written XXX</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>WRITE_DISK
|
|
||||||
ARCHITECTURE</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>GENERAL SERVICES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>archive_read</b>,
|
|
||||||
<b>archive_write</b>, and <b>archive_write_disk</b> objects
|
|
||||||
all contain an initial <b>archive</b> 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 <b>archive</b> 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>MISCELLANEOUS NOTES</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">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
|
|
||||||
necessary to locate various pieces of information. In
|
|
||||||
contrast, libarchive never seeks backwards in its input,
|
|
||||||
which sometimes requires very different approaches.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">For example,
|
|
||||||
libarchive’s ISO9660 support operates very differently
|
|
||||||
from most ISO9660 readers. The libarchive support utilizes a
|
|
||||||
work-queue design that keeps a list of known entries sorted
|
|
||||||
by their location in the input. Whenever libarchive’s
|
|
||||||
ISO9660 implementation is asked for the next header, checks
|
|
||||||
this list to find the next item on the disk. Directories are
|
|
||||||
parsed when they are encountered and new items are added to
|
|
||||||
the list. This design relies heavily on the ISO9660 image
|
|
||||||
being optimized so that directories always occur earlier on
|
|
||||||
the disk than the files they describe.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Depending on the
|
|
||||||
specific format, such approaches may not be possible. The
|
|
||||||
ZIP format specification, for example, allows archivers to
|
|
||||||
store key information only at the end of the file. In
|
|
||||||
theory, it is possible to create ZIP archives that cannot be
|
|
||||||
read without seeking. 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.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">archive_entry(3),
|
|
||||||
archive_read(3), archive_write(3), archive_write_disk(3),
|
|
||||||
libarchive(3)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
first appeared in FreeBSD 5.3.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>AUTHORS</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>libarchive</b> library
|
|
||||||
was written by Tim Kientzle <kientzle@acm.org>.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
January 26, 2011 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,378 +0,0 @@
|
||||||
<!-- Creator : groff version 1.22.4 -->
|
|
||||||
<!-- CreationDate: Fri Dec 9 13:39:24 2022 -->
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/html4/loose.dtd">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
||||||
<meta name="Content-Style" content="text/css">
|
|
||||||
<style type="text/css">
|
|
||||||
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
|
|
||||||
h1 { text-align: center }
|
|
||||||
</style>
|
|
||||||
<title></title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
|
|
||||||
<p>MTREE(5) BSD File Formats Manual MTREE(5)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>NAME</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;"><b>mtree</b> — format of
|
|
||||||
mtree dir hierarchy files</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>DESCRIPTION</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>mtree</b> format is a
|
|
||||||
textual format that describes a collection of filesystem
|
|
||||||
objects. Such files are typically used to create or verify
|
|
||||||
directory hierarchies.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>General
|
|
||||||
Format</b> <br>
|
|
||||||
An <b>mtree</b> file consists of a series of lines, each
|
|
||||||
providing information about a single filesystem object.
|
|
||||||
Leading whitespace is always ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">When encoding
|
|
||||||
file or pathnames, any backslash character or character
|
|
||||||
outside of the 95 printable ASCII characters must be 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 corresponding
|
|
||||||
character.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Each line is
|
|
||||||
interpreted independently as one of the following types:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Blank</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Blank lines are
|
|
||||||
ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Comment</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Lines beginning
|
|
||||||
with <b>#</b> are ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Special</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Lines beginning
|
|
||||||
with <b>/</b> are special commands that influence the
|
|
||||||
interpretation of later lines.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Relative</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">If the first
|
|
||||||
whitespace-delimited word has no <b>/</b> characters, it is
|
|
||||||
the name of a file in the current directory. Any relative
|
|
||||||
entry that describes a directory changes the current
|
|
||||||
directory.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">dot-dot</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">As a special
|
|
||||||
case, a relative entry with the filename <i>..</i> changes
|
|
||||||
the current directory to the parent directory. Options on
|
|
||||||
dot-dot entries are always ignored.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em">Full</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">If the first
|
|
||||||
whitespace-delimited word has a <b>/</b> character after the
|
|
||||||
first character, it is the pathname of a file relative to
|
|
||||||
the starting directory. There can be multiple full entries
|
|
||||||
describing the same file.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Some tools that
|
|
||||||
process <b>mtree</b> 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 specification.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Special
|
|
||||||
commands</b> <br>
|
|
||||||
Two special commands are currently defined:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>/set</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">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 keyword.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>/unset</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">This command
|
|
||||||
removes any default value set by a previous <b>/set</b>
|
|
||||||
command. It is followed on the same line by one or more
|
|
||||||
keywords separated by whitespace.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em"><b>Keywords</b>
|
|
||||||
<br>
|
|
||||||
After the filename, a full or relative entry consists of
|
|
||||||
zero or more whitespace-separated keyword definitions. Each
|
|
||||||
such definition consists of a key from the following list
|
|
||||||
immediately followed by an ’=’ sign and a value.
|
|
||||||
Software programs reading mtree files should warn about
|
|
||||||
unrecognized keywords.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">Currently
|
|
||||||
supported keywords are as follows:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>cksum</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The checksum of
|
|
||||||
the file using the default algorithm specified by the
|
|
||||||
cksum(1) utility.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>device</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The device
|
|
||||||
number for <b>block</b> or <b>char</b> file types. The value
|
|
||||||
must be one of the following forms:</p>
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>format</i>,<i>major</i>,<i>minor</i>[
|
|
||||||
<br>
|
|
||||||
,<i>subunit</i>]</p>
|
|
||||||
|
|
||||||
<p style="margin-left:29%;">A device with <i>major</i>,
|
|
||||||
<i>minor</i> and optional <i>subunit</i> fields. Their
|
|
||||||
meaning is specified by the operating’s system
|
|
||||||
<i>format</i>. See below for valid formats.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><i>number</i></p>
|
|
||||||
|
|
||||||
<p style="margin-left:29%;">Opaque number (as stored on the
|
|
||||||
file system).</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The following
|
|
||||||
values for <i>format</i> are recognized: <b>native</b>,
|
|
||||||
<b>386bsd</b>, <b>4bsd</b>, <b>bsdos</b>, <b>freebsd</b>,
|
|
||||||
<b>hpux</b>, <b>isc</b>, <b>linux</b>, <b>netbsd</b>,
|
|
||||||
<b>osf1</b>, <b>sco</b>, <b>solaris</b>, <b>sunos</b>,
|
|
||||||
<b>svr3</b>, <b>svr4</b>, and <b>ultrix</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">See mknod(8)
|
|
||||||
for more details.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>contents</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The full
|
|
||||||
pathname of a file that holds the contents of this file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>flags</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The file flags
|
|
||||||
as a symbolic name. See chflags(1) for information on these
|
|
||||||
names. If no flags are to be set the string
|
|
||||||
“none” may be used to override the current
|
|
||||||
default.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>gid</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The file group
|
|
||||||
as a numeric value.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>gname</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The file group
|
|
||||||
as a symbolic name.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ignore</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Ignore any file
|
|
||||||
hierarchy below this file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>inode</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The inode
|
|
||||||
number.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>link</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The target of
|
|
||||||
the symbolic link when type=link.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>md5</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The MD5 message
|
|
||||||
digest of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>md5digest</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">A synonym for
|
|
||||||
<b>md5</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>mode</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The current
|
|
||||||
file’s permissions as a numeric (octal) or symbolic
|
|
||||||
value.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>nlink</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The number of
|
|
||||||
hard links the file is expected to have.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>nochange</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">Make sure this
|
|
||||||
file or directory exists but otherwise ignore all
|
|
||||||
attributes.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>optional</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The file is
|
|
||||||
optional; do not complain about the file if it is not in the
|
|
||||||
file hierarchy.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>resdevice</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The
|
|
||||||
“resident” device number of the file, e.g. the
|
|
||||||
ID of the device that contains the file. Its format is the
|
|
||||||
same as the one for <b>device</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>ripemd160digest</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">The RIPEMD160 message digest of
|
|
||||||
the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>rmd160</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">A synonym for
|
|
||||||
<b>ripemd160digest</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>rmd160digest</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">A synonym for
|
|
||||||
<b>ripemd160digest</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha1</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The FIPS 160-1
|
|
||||||
(“SHA-1”) message digest of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha1digest</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">A synonym for
|
|
||||||
<b>sha1</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha256</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
|
|
||||||
(“SHA-256”) message digest of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha256digest</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">A synonym for
|
|
||||||
<b>sha256</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha384</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
|
|
||||||
(“SHA-384”) message digest of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha384digest</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">A synonym for
|
|
||||||
<b>sha384</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha512</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The FIPS 180-2
|
|
||||||
(“SHA-512”) message digest of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>sha512digest</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%;">A synonym for
|
|
||||||
<b>sha512</b>.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>size</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The size, in
|
|
||||||
bytes, of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>time</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The last
|
|
||||||
modification time of the file.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>type</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The type of the
|
|
||||||
file; may be set to any one of the following:</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>block</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">block special
|
|
||||||
device</p>
|
|
||||||
|
|
||||||
<p><b>char</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">character
|
|
||||||
special device</p>
|
|
||||||
|
|
||||||
<p><b>dir</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">directory</p>
|
|
||||||
|
|
||||||
<p><b>fifo</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">fifo</p>
|
|
||||||
|
|
||||||
<p><b>file</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">regular
|
|
||||||
file</p>
|
|
||||||
|
|
||||||
<p><b>link</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">symbolic
|
|
||||||
link</p>
|
|
||||||
|
|
||||||
<p><b>socket</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:37%; margin-top: 1em">socket</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>uid</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The file owner
|
|
||||||
as a numeric value.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>uname</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:22%; margin-top: 1em">The file owner
|
|
||||||
as a symbolic name.</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>SEE ALSO</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">cksum(1), find(1), mtree(8)</p>
|
|
||||||
|
|
||||||
<p style="margin-top: 1em"><b>HISTORY</b></p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%;">The <b>mtree</b> utility
|
|
||||||
appeared in 4.3BSD-Reno. The MD5 digest capability was added
|
|
||||||
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.</p>
|
|
||||||
|
|
||||||
<p style="margin-left:6%; margin-top: 1em">BSD
|
|
||||||
September 4, 2013 BSD</p>
|
|
||||||
<hr>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,133 +0,0 @@
|
||||||
|
|
||||||
default: all
|
|
||||||
|
|
||||||
|
|
||||||
archive_entry.3: ../mdoc2man.awk ../../libarchive/archive_entry.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry.3 > archive_entry.3
|
|
||||||
|
|
||||||
archive_entry_acl.3: ../mdoc2man.awk ../../libarchive/archive_entry_acl.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry_acl.3 > archive_entry_acl.3
|
|
||||||
|
|
||||||
archive_entry_linkify.3: ../mdoc2man.awk ../../libarchive/archive_entry_linkify.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry_linkify.3 > archive_entry_linkify.3
|
|
||||||
|
|
||||||
archive_entry_misc.3: ../mdoc2man.awk ../../libarchive/archive_entry_misc.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry_misc.3 > archive_entry_misc.3
|
|
||||||
|
|
||||||
archive_entry_paths.3: ../mdoc2man.awk ../../libarchive/archive_entry_paths.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry_paths.3 > archive_entry_paths.3
|
|
||||||
|
|
||||||
archive_entry_perms.3: ../mdoc2man.awk ../../libarchive/archive_entry_perms.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry_perms.3 > archive_entry_perms.3
|
|
||||||
|
|
||||||
archive_entry_stat.3: ../mdoc2man.awk ../../libarchive/archive_entry_stat.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry_stat.3 > archive_entry_stat.3
|
|
||||||
|
|
||||||
archive_entry_time.3: ../mdoc2man.awk ../../libarchive/archive_entry_time.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_entry_time.3 > archive_entry_time.3
|
|
||||||
|
|
||||||
archive_read.3: ../mdoc2man.awk ../../libarchive/archive_read.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read.3 > archive_read.3
|
|
||||||
|
|
||||||
archive_read_add_passphrase.3: ../mdoc2man.awk ../../libarchive/archive_read_add_passphrase.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_add_passphrase.3 > archive_read_add_passphrase.3
|
|
||||||
|
|
||||||
archive_read_data.3: ../mdoc2man.awk ../../libarchive/archive_read_data.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_data.3 > archive_read_data.3
|
|
||||||
|
|
||||||
archive_read_disk.3: ../mdoc2man.awk ../../libarchive/archive_read_disk.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_disk.3 > archive_read_disk.3
|
|
||||||
|
|
||||||
archive_read_extract.3: ../mdoc2man.awk ../../libarchive/archive_read_extract.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_extract.3 > archive_read_extract.3
|
|
||||||
|
|
||||||
archive_read_filter.3: ../mdoc2man.awk ../../libarchive/archive_read_filter.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_filter.3 > archive_read_filter.3
|
|
||||||
|
|
||||||
archive_read_format.3: ../mdoc2man.awk ../../libarchive/archive_read_format.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_format.3 > archive_read_format.3
|
|
||||||
|
|
||||||
archive_read_free.3: ../mdoc2man.awk ../../libarchive/archive_read_free.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_free.3 > archive_read_free.3
|
|
||||||
|
|
||||||
archive_read_header.3: ../mdoc2man.awk ../../libarchive/archive_read_header.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_header.3 > archive_read_header.3
|
|
||||||
|
|
||||||
archive_read_new.3: ../mdoc2man.awk ../../libarchive/archive_read_new.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_new.3 > archive_read_new.3
|
|
||||||
|
|
||||||
archive_read_open.3: ../mdoc2man.awk ../../libarchive/archive_read_open.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_open.3 > archive_read_open.3
|
|
||||||
|
|
||||||
archive_read_set_options.3: ../mdoc2man.awk ../../libarchive/archive_read_set_options.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_read_set_options.3 > archive_read_set_options.3
|
|
||||||
|
|
||||||
archive_util.3: ../mdoc2man.awk ../../libarchive/archive_util.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_util.3 > archive_util.3
|
|
||||||
|
|
||||||
archive_write.3: ../mdoc2man.awk ../../libarchive/archive_write.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write.3 > archive_write.3
|
|
||||||
|
|
||||||
archive_write_blocksize.3: ../mdoc2man.awk ../../libarchive/archive_write_blocksize.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_blocksize.3 > archive_write_blocksize.3
|
|
||||||
|
|
||||||
archive_write_data.3: ../mdoc2man.awk ../../libarchive/archive_write_data.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_data.3 > archive_write_data.3
|
|
||||||
|
|
||||||
archive_write_disk.3: ../mdoc2man.awk ../../libarchive/archive_write_disk.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_disk.3 > archive_write_disk.3
|
|
||||||
|
|
||||||
archive_write_filter.3: ../mdoc2man.awk ../../libarchive/archive_write_filter.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_filter.3 > archive_write_filter.3
|
|
||||||
|
|
||||||
archive_write_finish_entry.3: ../mdoc2man.awk ../../libarchive/archive_write_finish_entry.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_finish_entry.3 > archive_write_finish_entry.3
|
|
||||||
|
|
||||||
archive_write_format.3: ../mdoc2man.awk ../../libarchive/archive_write_format.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_format.3 > archive_write_format.3
|
|
||||||
|
|
||||||
archive_write_free.3: ../mdoc2man.awk ../../libarchive/archive_write_free.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_free.3 > archive_write_free.3
|
|
||||||
|
|
||||||
archive_write_header.3: ../mdoc2man.awk ../../libarchive/archive_write_header.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_header.3 > archive_write_header.3
|
|
||||||
|
|
||||||
archive_write_new.3: ../mdoc2man.awk ../../libarchive/archive_write_new.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_new.3 > archive_write_new.3
|
|
||||||
|
|
||||||
archive_write_open.3: ../mdoc2man.awk ../../libarchive/archive_write_open.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_open.3 > archive_write_open.3
|
|
||||||
|
|
||||||
archive_write_set_options.3: ../mdoc2man.awk ../../libarchive/archive_write_set_options.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_set_options.3 > archive_write_set_options.3
|
|
||||||
|
|
||||||
archive_write_set_passphrase.3: ../mdoc2man.awk ../../libarchive/archive_write_set_passphrase.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/archive_write_set_passphrase.3 > archive_write_set_passphrase.3
|
|
||||||
|
|
||||||
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_internals.3: ../mdoc2man.awk ../../libarchive/libarchive_internals.3
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/libarchive_internals.3 > libarchive_internals.3
|
|
||||||
|
|
||||||
mtree.5: ../mdoc2man.awk ../../libarchive/mtree.5
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/mtree.5 > mtree.5
|
|
||||||
|
|
||||||
tar.5: ../mdoc2man.awk ../../libarchive/tar.5
|
|
||||||
awk -f ../mdoc2man.awk < ../../libarchive/tar.5 > tar.5
|
|
||||||
|
|
||||||
bsdtar.1: ../mdoc2man.awk ../../tar/bsdtar.1
|
|
||||||
awk -f ../mdoc2man.awk < ../../tar/bsdtar.1 > bsdtar.1
|
|
||||||
|
|
||||||
bsdcpio.1: ../mdoc2man.awk ../../cpio/bsdcpio.1
|
|
||||||
awk -f ../mdoc2man.awk < ../../cpio/bsdcpio.1 > bsdcpio.1
|
|
||||||
all: archive_entry.3 archive_entry_acl.3 archive_entry_linkify.3 archive_entry_misc.3 archive_entry_paths.3 archive_entry_perms.3 archive_entry_stat.3 archive_entry_time.3 archive_read.3 archive_read_add_passphrase.3 archive_read_data.3 archive_read_disk.3 archive_read_extract.3 archive_read_filter.3 archive_read_format.3 archive_read_free.3 archive_read_header.3 archive_read_new.3 archive_read_open.3 archive_read_set_options.3 archive_util.3 archive_write.3 archive_write_blocksize.3 archive_write_data.3 archive_write_disk.3 archive_write_filter.3 archive_write_finish_entry.3 archive_write_format.3 archive_write_free.3 archive_write_header.3 archive_write_new.3 archive_write_open.3 archive_write_set_options.3 archive_write_set_passphrase.3 cpio.5 libarchive-formats.5 libarchive.3 libarchive_changes.3 libarchive_internals.3 mtree.5 tar.5 bsdtar.1 bsdcpio.1
|
|
|
@ -1,143 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY 3 "February 2, 2012" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_clear\fP,
|
|
||||||
\fB\%archive_entry_clone\fP,
|
|
||||||
\fB\%archive_entry_free\fP,
|
|
||||||
\fB\%archive_entry_new\fP
|
|
||||||
\- functions for managing archive entry descriptions
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fIstruct archive_entry *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_clear\fP(\fI\%struct\ archive_entry\ *\fP);
|
|
||||||
.br
|
|
||||||
\fIstruct archive_entry *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_clone\fP(\fI\%struct\ archive_entry\ *\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_free\fP(\fI\%struct\ archive_entry\ *\fP);
|
|
||||||
.br
|
|
||||||
\fIstruct archive_entry *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_new\fP(\fI\%void\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
These functions create and manipulate data objects that
|
|
||||||
represent entries within an archive.
|
|
||||||
You can think of a
|
|
||||||
Tn struct archive_entry
|
|
||||||
as a heavy-duty version of
|
|
||||||
Tn struct stat:
|
|
||||||
it includes everything from
|
|
||||||
Tn struct stat
|
|
||||||
plus associated pathname, textual group and user names, etc.
|
|
||||||
These objects are used by
|
|
||||||
\fBlibarchive\fP(3)
|
|
||||||
to represent the metadata associated with a particular
|
|
||||||
entry in an archive.
|
|
||||||
.SS Create and Destroy
|
|
||||||
There are functions to allocate, destroy, clear, and copy
|
|
||||||
\fIarchive_entry\fP
|
|
||||||
objects:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
\fB\%archive_entry_clear\fP()
|
|
||||||
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.
|
|
||||||
.TP
|
|
||||||
\fB\%archive_entry_clone\fP()
|
|
||||||
A deep copy operation; all text fields are duplicated.
|
|
||||||
.TP
|
|
||||||
\fB\%archive_entry_free\fP()
|
|
||||||
Releases the
|
|
||||||
Tn struct archive_entry
|
|
||||||
object.
|
|
||||||
.TP
|
|
||||||
\fB\%archive_entry_new\fP()
|
|
||||||
Allocate and return a blank
|
|
||||||
Tn struct archive_entry
|
|
||||||
object.
|
|
||||||
.RE
|
|
||||||
.SS Function groups
|
|
||||||
Due to high number of functions, the accessor functions can be found in
|
|
||||||
man pages grouped by the purpose.
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
\fBarchive_entry_acl\fP(3)
|
|
||||||
Access Control List manipulation
|
|
||||||
.TP
|
|
||||||
\fBarchive_entry_paths\fP(3)
|
|
||||||
Path name manipulation
|
|
||||||
.TP
|
|
||||||
\fBarchive_entry_perms\fP(3)
|
|
||||||
User, group and mode manipulation
|
|
||||||
.TP
|
|
||||||
\fBarchive_entry_stat\fP(3)
|
|
||||||
Functions not in the other groups and copying to/from
|
|
||||||
Vt struct stat.
|
|
||||||
.TP
|
|
||||||
\fBarchive_entry_time\fP(3)
|
|
||||||
Time field manipulation
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Most of the functions set or read entries in an object.
|
|
||||||
Such functions have one of the following forms:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
\fB\%archive_entry_set_XXXX\fP()
|
|
||||||
Stores the provided data in the object.
|
|
||||||
In particular, for strings, the pointer is stored,
|
|
||||||
not the referenced string.
|
|
||||||
.TP
|
|
||||||
\fB\%archive_entry_copy_XXXX\fP()
|
|
||||||
As above, except that the referenced data is copied
|
|
||||||
into the object.
|
|
||||||
.TP
|
|
||||||
\fB\%archive_entry_XXXX\fP()
|
|
||||||
Returns the specified data.
|
|
||||||
In the case of strings, a const-qualified pointer to
|
|
||||||
the string is returned.
|
|
||||||
.RE
|
|
||||||
String data can be set or accessed as wide character strings
|
|
||||||
or normal
|
|
||||||
\fIchar\fP
|
|
||||||
strings.
|
|
||||||
The functions that use wide character strings are suffixed with
|
|
||||||
\fB_w\fP.
|
|
||||||
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 discarded in favor of the new data.
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBarchive_entry_acl\fP(3),
|
|
||||||
\fBarchive_entry_paths\fP(3),
|
|
||||||
\fBarchive_entry_perms\fP(3),
|
|
||||||
\fBarchive_entry_time\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
||||||
.SH HISTORY
|
|
||||||
.ad l
|
|
||||||
The
|
|
||||||
\fB\%libarchive\fP
|
|
||||||
library first appeared in
|
|
||||||
FreeBSD 5.3.
|
|
||||||
.SH AUTHORS
|
|
||||||
.ad l
|
|
||||||
-nosplit
|
|
||||||
The
|
|
||||||
\fB\%libarchive\fP
|
|
||||||
library was written by
|
|
||||||
Tim Kientzle \%<kientzle@acm.org.>
|
|
|
@ -1,452 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY_ACL 3 "February 15, 2017" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_acl_add_entry\fP,
|
|
||||||
\fB\%archive_entry_acl_add_entry_w\fP,
|
|
||||||
\fB\%archive_entry_acl_clear\fP,
|
|
||||||
\fB\%archive_entry_acl_count\fP,
|
|
||||||
\fB\%archive_entry_acl_from_text\fP,
|
|
||||||
\fB\%archive_entry_acl_from_text_w\fP,
|
|
||||||
\fB\%archive_entry_acl_next\fP,
|
|
||||||
\fB\%archive_entry_acl_reset\fP,
|
|
||||||
\fB\%archive_entry_acl_to_text\fP,
|
|
||||||
\fB\%archive_entry_acl_to_text_w\fP,
|
|
||||||
\fB\%archive_entry_acl_types\fP
|
|
||||||
\- functions for manipulating Access Control Lists in archive entry descriptions
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_add_entry\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP, \fI\%int\ permset\fP, \fI\%int\ tag\fP, \fI\%int\ qualifier\fP, \fI\%const\ char\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_add_entry_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP, \fI\%int\ permset\fP, \fI\%int\ tag\fP, \fI\%int\ qualifier\fP, \fI\%const\ wchar_t\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_clear\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_count\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_from_text\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *text\fP, \fI\%int\ type\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_from_text_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *text\fP, \fI\%int\ type\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_next\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP, \fI\%int\ *ret_type\fP, \fI\%int\ *ret_permset\fP, \fI\%int\ *ret_tag\fP, \fI\%int\ *ret_qual\fP, \fI\%const\ char\ **ret_name\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_reset\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\ type\fP);
|
|
||||||
.br
|
|
||||||
\fIchar *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_to_text\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%ssize_t\ *len_p\fP, \fI\%int\ flags\fP);
|
|
||||||
.br
|
|
||||||
\fIwchar_t *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_to_text_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%ssize_t\ *len_p\fP, \fI\%int\ flags\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_acl_types\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
The
|
|
||||||
``Access Control Lists (ACLs)''
|
|
||||||
extend the standard Unix permission model.
|
|
||||||
The ACL interface of
|
|
||||||
\fB\%libarchive\fP
|
|
||||||
supports both POSIX.1e and NFSv4 style ACLs.
|
|
||||||
Use of ACLs is restricted by
|
|
||||||
various levels of ACL support in operating systems, file systems and archive
|
|
||||||
formats.
|
|
||||||
.SS POSIX.1e Access Control Lists
|
|
||||||
A POSIX.1e ACL consists of a number of independent entries.
|
|
||||||
Each entry specifies the permission set as a bitmask of basic permissions.
|
|
||||||
Valid permissions in the
|
|
||||||
are:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_READ (.B r )
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_WRITE (.B w )
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_EXECUTE (.B x )
|
|
||||||
.RE
|
|
||||||
The permissions correspond to the normal Unix permissions.
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
specifies the principal to which the permission applies.
|
|
||||||
Valid values are:
|
|
||||||
.RS 5
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_USER
|
|
||||||
The user specified by the name field.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_USER_OBJ
|
|
||||||
The owner of the file.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_GROUP
|
|
||||||
The group specified by the name field.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_GROUP_OBJ
|
|
||||||
The group which owns the file.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_MASK
|
|
||||||
The maximum permissions to be obtained via group permissions.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_OTHER
|
|
||||||
Any principal who is not the file owner or a member of the owning group.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The principals
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_USER_OBJ,
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_GROUP_OBJ
|
|
||||||
and
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_OTHER
|
|
||||||
are equivalent to user, group and other in the classic Unix permission
|
|
||||||
model and specify non-extended ACL entries.
|
|
||||||
.PP
|
|
||||||
All files have an access ACL
|
|
||||||
(.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS.)
|
|
||||||
This specifies the permissions required for access to the file itself.
|
|
||||||
Directories have an additional ACL
|
|
||||||
(.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT,)
|
|
||||||
which controls the initial access ACL for newly-created directory entries.
|
|
||||||
.SS NFSv4 Access Control Lists
|
|
||||||
A NFSv4 ACL consists of multiple individual entries called Access Control
|
|
||||||
Entries (ACEs).
|
|
||||||
.PP
|
|
||||||
There are four possible types of a NFSv4 ACE:
|
|
||||||
.RS 5
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_TYPE_ALLOW
|
|
||||||
Allow principal to perform actions requiring given permissions.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_TYPE_DENY
|
|
||||||
Prevent principal from performing actions requiring given permissions.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_TYPE_AUDIT
|
|
||||||
Log access attempts by principal which require given permissions.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_TYPE_ALARM
|
|
||||||
Trigger a system alarm on access attempts by principal which require given
|
|
||||||
permissions.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
specifies the principal to which the permission applies.
|
|
||||||
Valid values are:
|
|
||||||
.RS 5
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_USER
|
|
||||||
The user specified by the name field.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_USER_OBJ
|
|
||||||
The owner of the file.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_GROUP
|
|
||||||
The group specified by the name field.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_GROUP_OBJ
|
|
||||||
The group which owns the file.
|
|
||||||
It .BR ARCHIVE_ENTRY_ACL_EVERYONE
|
|
||||||
Any principal who is not the file owner or a member of the owning group.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Entries with the
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_USER
|
|
||||||
or
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_GROUP
|
|
||||||
tag store the user and group name in the
|
|
||||||
string and optionally the user or group ID in the
|
|
||||||
integer.
|
|
||||||
.PP
|
|
||||||
NFSv4 ACE permissions and flags are stored in the same
|
|
||||||
bitfield.
|
|
||||||
Some permissions share the same constant and permission character
|
|
||||||
but have different effect on directories than on files.
|
|
||||||
The following ACE permissions are supported:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_READ_DATA (.B r )
|
|
||||||
Read data (file).
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_LIST_DIRECTORY (.B r )
|
|
||||||
List entries (directory).
|
|
||||||
.TP
|
|
||||||
ARCHIVE_ENTRY_ACL_WRITE_DATA (.B w )
|
|
||||||
Write data (file).
|
|
||||||
.TP
|
|
||||||
ARCHIVE_ENTRY_ACL_ADD_FILE (.B w )
|
|
||||||
Create files (directory).
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_EXECUTE (.B x )
|
|
||||||
Execute file or change into a directory.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_APPEND_DATA (.B p )
|
|
||||||
Append data (file).
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ADD_SUBDIRECTORY (.B p )
|
|
||||||
Create subdirectories (directory).
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_DELETE_CHILD (.B D )
|
|
||||||
Remove files and subdirectories inside a directory.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_DELETE (.B d )
|
|
||||||
Remove file or directory.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_READ_ATTRIBUTES (.B a )
|
|
||||||
Read file or directory attributes.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_WRITE_ATTRIBUTES (.B A )
|
|
||||||
Write file or directory attributes.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_READ_NAMED_ATTRS (.B R )
|
|
||||||
Read named file or directory attributes.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_WRITE_NAMED_ATTRS (.B W )
|
|
||||||
Write named file or directory attributes.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_READ_ACL (.B c )
|
|
||||||
Read file or directory ACL.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_WRITE_ACL (.B C )
|
|
||||||
Write file or directory ACL.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_WRITE_OWNER (.B o )
|
|
||||||
Change owner of a file or directory.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_SYNCHRONIZE (.B s )
|
|
||||||
Use synchronous I/O.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The following NFSv4 ACL inheritance flags are supported:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ENTRY_FILE_INHERIT (.B f )
|
|
||||||
Inherit parent directory ACE to files.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ENTRY_DIRECTORY_INHERIT (.B d )
|
|
||||||
Inherit parent directory ACE to subdirectories.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ENTRY_INHERIT_ONLY (.B i )
|
|
||||||
Only inherit, do not apply the permission on the directory itself.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ENTRY_NO_PROPAGATE_INHERIT (.B n )
|
|
||||||
Do not propagate inherit flags.
|
|
||||||
Only first-level entries inherit ACLs.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ENTRY_SUCCESSFUL_ACCESS (.B S )
|
|
||||||
Trigger alarm or audit on successful access.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ENTRY_FAILED_ACCESS (.B F )
|
|
||||||
Trigger alarm or audit on failed access.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_ENTRY_INHERITED (.B I )
|
|
||||||
Mark that ACE was inherited.
|
|
||||||
.RE
|
|
||||||
.SS Functions
|
|
||||||
\fB\%archive_entry_acl_add_entry\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_acl_add_entry_w\fP()
|
|
||||||
add a single ACL entry.
|
|
||||||
For the access ACL and non-extended principals, the classic Unix permissions
|
|
||||||
are updated.
|
|
||||||
An archive entry cannot contain both POSIX.1e and NFSv4 ACL entries.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_clear\fP()
|
|
||||||
removes all ACL entries and resets the enumeration pointer.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_count\fP()
|
|
||||||
counts the ACL entries that have the given type mask.
|
|
||||||
can be the bitwise-or of
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
|
|
||||||
.RE
|
|
||||||
for POSIX.1e ACLs and
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ALLOW
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_DENY
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_AUDIT
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ALARM
|
|
||||||
.RE
|
|
||||||
for NFSv4 ACLs.
|
|
||||||
For POSIX.1e ACLs if
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
|
|
||||||
is included and at least one extended ACL entry is found,
|
|
||||||
the three non-extended ACLs are added.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_from_text\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_acl_from_text_w\fP()
|
|
||||||
add new
|
|
||||||
(or merge with existing)
|
|
||||||
ACL entries from
|
|
||||||
(wide)
|
|
||||||
text.
|
|
||||||
The argument
|
|
||||||
may take one of the following values:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_NFS4
|
|
||||||
.RE
|
|
||||||
Supports all formats that can be created with
|
|
||||||
\fB\%archive_entry_acl_to_text\fP()
|
|
||||||
or respectively
|
|
||||||
\fB\%archive_entry_acl_to_text_w\fP().
|
|
||||||
Existing ACL entries are preserved.
|
|
||||||
To get a clean new ACL from text
|
|
||||||
\fB\%archive_entry_acl_clear\fP()
|
|
||||||
must be called first.
|
|
||||||
Entries prefixed with
|
|
||||||
``default:''
|
|
||||||
are treated as
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
|
|
||||||
unless
|
|
||||||
is
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_NFS4.
|
|
||||||
Invalid entries, non-parseable ACL entries and entries beginning with
|
|
||||||
the
|
|
||||||
Sq #
|
|
||||||
character
|
|
||||||
(comments)
|
|
||||||
are skipped.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_next\fP()
|
|
||||||
return the next entry of the ACL list.
|
|
||||||
This functions may only be called after
|
|
||||||
\fB\%archive_entry_acl_reset\fP()
|
|
||||||
has indicated the presence of extended ACL entries.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_reset\fP()
|
|
||||||
prepare reading the list of ACL entries with
|
|
||||||
\fB\%archive_entry_acl_next\fP().
|
|
||||||
The function returns 0 if no non-extended ACLs are found.
|
|
||||||
In this case, the access permissions should be obtained by
|
|
||||||
\fBarchive_entry_mode\fP(3)
|
|
||||||
or set using
|
|
||||||
\fBchmod\fP(2).
|
|
||||||
Otherwise, the function returns the same value as
|
|
||||||
\fB\%archive_entry_acl_count\fP().
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_to_text\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_acl_to_text_w\fP()
|
|
||||||
convert the ACL entries for the given type into a
|
|
||||||
(wide)
|
|
||||||
string of ACL entries separated by newline.
|
|
||||||
If the pointer
|
|
||||||
is not NULL, then the function shall return the length of the string
|
|
||||||
(not including the NULL terminator)
|
|
||||||
in the location pointed to by
|
|
||||||
.
|
|
||||||
The
|
|
||||||
argument is a bitwise-or.
|
|
||||||
.PP
|
|
||||||
The following flags are effective only on POSIX.1e ACL:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
|
|
||||||
Output access ACLs.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
|
|
||||||
Output POSIX.1e default ACLs.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT
|
|
||||||
Prefix each default ACL entry with the word
|
|
||||||
``default:''.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_STYLE_SOLARIS
|
|
||||||
The mask and other ACLs don not contain a double colon.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The following flags are effecive only on NFSv4 ACL:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_STYLE_COMPACT
|
|
||||||
Do not output minus characters for unset permissions and flags in NFSv4 ACL
|
|
||||||
permission and flag fields.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The following flags are effective on both POSIX.1e and NFSv4 ACL:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID
|
|
||||||
Add an additional colon-separated field containing the user or group id.
|
|
||||||
.TP
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_STYLE_SEPARATOR_COMMA
|
|
||||||
Separate ACL entries with comma instead of newline.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
If the archive entry contains NFSv4 ACLs, all types of NFSv4 ACLs are returned.
|
|
||||||
It the entry contains POSIX.1e ACLs and none of the flags
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
|
|
||||||
or
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_DEFAULT
|
|
||||||
are specified, both access and default entries are returned and default entries
|
|
||||||
are prefixed with
|
|
||||||
``default:''.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_types\fP()
|
|
||||||
get ACL entry types contained in an archive entry's ACL.
|
|
||||||
As POSIX.1e and NFSv4
|
|
||||||
ACL entries cannot be mixed, this function is a very efficient way to detect if
|
|
||||||
an ACL already contains POSIX.1e or NFSv4 ACL entries.
|
|
||||||
.SH RETURN VALUES
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_acl_count\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_acl_reset\fP()
|
|
||||||
returns the number of ACL entries that match the given type mask.
|
|
||||||
For POSIX.1e ACLS if the type mask includes
|
|
||||||
.BR ARCHIVE_ENTRY_ACL_TYPE_ACCESS
|
|
||||||
and at least one extended ACL entry exists, the three classic Unix
|
|
||||||
permissions are counted.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_from_text\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_acl_from_text_w\fP()
|
|
||||||
return
|
|
||||||
.BR ARCHIVE_OK
|
|
||||||
if all entries were successfully parsed and
|
|
||||||
.BR ARCHIVE_WARN
|
|
||||||
if one or more entries were invalid or non-parseable.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_next\fP()
|
|
||||||
returns
|
|
||||||
.BR ARCHIVE_OK
|
|
||||||
on success,
|
|
||||||
.BR ARCHIVE_EOF
|
|
||||||
if no more ACL entries exist
|
|
||||||
and
|
|
||||||
.BR ARCHIVE_WARN
|
|
||||||
if
|
|
||||||
\fB\%archive_entry_acl_reset\fP()
|
|
||||||
has not been called first.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_to_text\fP()
|
|
||||||
returns a string representing the ACL entries matching the given type and
|
|
||||||
flags on success or NULL on error.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_to_text_w\fP()
|
|
||||||
returns a wide string representing the ACL entries matching the given type
|
|
||||||
and flags on success or NULL on error.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_acl_types\fP()
|
|
||||||
returns a bitmask of ACL entry types or 0 if archive entry has no ACL entries.
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBarchive_entry\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
|
@ -1,203 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY_LINKIFY 3 "February 2, 2012" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_linkresolver\fP,
|
|
||||||
\fB\%archive_entry_linkresolver_new\fP,
|
|
||||||
\fB\%archive_entry_linkresolver_set_strategy\fP,
|
|
||||||
\fB\%archive_entry_linkresolver_free\fP,
|
|
||||||
\fB\%archive_entry_linkify\fP
|
|
||||||
\- hardlink resolver functions
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fIstruct archive_entry_linkresolver *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_linkresolver_new\fP(\fI\%void\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_linkresolver_set_strategy\fP(\fI\%struct\ archive_entry_linkresolver\ *resolver\fP, \fI\%int\ format\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_linkresolver_free\fP(\fI\%struct\ archive_entry_linkresolver\ *resolver\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_linkify\fP(\fI\%struct\ archive_entry_linkresolver\ *resolver\fP, \fI\%struct\ archive_entry\ **entry\fP, \fI\%struct\ archive_entry\ **sparse\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
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:
|
|
||||||
.RS 5
|
|
||||||
.IP 1.
|
|
||||||
Ignore hardlinks and store the body for each reference (old cpio, zip).
|
|
||||||
.IP 2.
|
|
||||||
Store the body the first time an inode is seen (ustar, pax).
|
|
||||||
.IP 3.
|
|
||||||
Store the body the last time an inode is seen (new cpio).
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
\fB\%archive_entry_linkresolver\fP
|
|
||||||
functions help by providing a unified interface and handling the complexity
|
|
||||||
behind the scene.
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
\fB\%archive_entry_linkresolver\fP
|
|
||||||
functions assume that
|
|
||||||
Vt 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 references can be recycled.
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
\fB\%archive_entry_linkresolver_new\fP()
|
|
||||||
function allocates a new link resolver.
|
|
||||||
The instance can be freed using
|
|
||||||
\fB\%archive_entry_linkresolver_free\fP().
|
|
||||||
All deferred entries are flushed and the internal storage is freed.
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
\fB\%archive_entry_linkresolver_set_strategy\fP()
|
|
||||||
function selects the optimal hardlink strategy for the given format.
|
|
||||||
The format code can be obtained from
|
|
||||||
\fBarchive_format\fP(3).
|
|
||||||
The function can be called more than once, but it is recommended to
|
|
||||||
flush all deferred entries first.
|
|
||||||
.PP
|
|
||||||
The
|
|
||||||
\fB\%archive_entry_linkify\fP()
|
|
||||||
function is the core of
|
|
||||||
\fB\%archive_entry_linkresolver\fP.
|
|
||||||
The
|
|
||||||
\fB\%entry\fP()
|
|
||||||
argument points to the
|
|
||||||
Vt archive_entry
|
|
||||||
that should be written.
|
|
||||||
Depending on the strategy one of the following actions is taken:
|
|
||||||
.RS 5
|
|
||||||
.IP 1.
|
|
||||||
For the simple archive formats
|
|
||||||
\fI*entry\fP
|
|
||||||
is left unmodified and
|
|
||||||
\fI*sparse\fP
|
|
||||||
is set to
|
|
||||||
.BR NULL.
|
|
||||||
.IP 2.
|
|
||||||
For tar like archive formats,
|
|
||||||
\fI*sparse\fP
|
|
||||||
is set to
|
|
||||||
.BR NULL.
|
|
||||||
If
|
|
||||||
\fI*entry\fP
|
|
||||||
is
|
|
||||||
.BR NULL,
|
|
||||||
no action is taken.
|
|
||||||
If the hardlink count of
|
|
||||||
\fI*entry\fP
|
|
||||||
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
|
|
||||||
\fI*entry\fP
|
|
||||||
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.
|
|
||||||
.IP 3.
|
|
||||||
For new cpio like archive formats a value for
|
|
||||||
\fI*entry\fP
|
|
||||||
of
|
|
||||||
.BR NULL
|
|
||||||
is used to flush deferred entries.
|
|
||||||
In that case
|
|
||||||
\fI*entry\fP
|
|
||||||
is set to an arbitrary deferred entry and the entry itself is removed from the
|
|
||||||
internal list.
|
|
||||||
If the internal list is empty,
|
|
||||||
\fI*entry\fP
|
|
||||||
is set to
|
|
||||||
.BR NULL.
|
|
||||||
In either case,
|
|
||||||
\fI*sparse\fP
|
|
||||||
is set to
|
|
||||||
.BR NULL
|
|
||||||
and the function returns.
|
|
||||||
If the hardlink count of
|
|
||||||
\fI*entry\fP
|
|
||||||
is one or the file type is a directory or device,
|
|
||||||
\fI*sparse\fP
|
|
||||||
is set to
|
|
||||||
.BR 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
|
|
||||||
\fI*entry\fP
|
|
||||||
and
|
|
||||||
\fI*sparse\fP
|
|
||||||
are set to
|
|
||||||
.BR 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
|
|
||||||
\fI*entry\fP
|
|
||||||
after retaining the link count.
|
|
||||||
The existing entry is returned in
|
|
||||||
\fI*entry\fP.
|
|
||||||
If the link count reached one, the new entry is also removed from the
|
|
||||||
internal list and returned in
|
|
||||||
\fI*sparse\fP.
|
|
||||||
Otherwise
|
|
||||||
\fI*sparse\fP
|
|
||||||
is set to
|
|
||||||
.BR NULL.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The general usage is therefore:
|
|
||||||
.RS 5
|
|
||||||
.IP 1.
|
|
||||||
For each new archive entry, call
|
|
||||||
\fB\%archive_entry_linkify\fP().
|
|
||||||
.IP 2.
|
|
||||||
Keep in mind that the entries returned may have a size of 0 now.
|
|
||||||
.IP 3.
|
|
||||||
If
|
|
||||||
\fI*entry\fP
|
|
||||||
is not
|
|
||||||
.BR NULL,
|
|
||||||
archive it.
|
|
||||||
.IP 4.
|
|
||||||
If
|
|
||||||
\fI*sparse\fP
|
|
||||||
is not
|
|
||||||
.BR NULL,
|
|
||||||
archive it.
|
|
||||||
.IP 5.
|
|
||||||
After all entries have been written to disk, call
|
|
||||||
\fB\%archive_entry_linkify\fP()
|
|
||||||
with
|
|
||||||
\fI*entry\fP
|
|
||||||
set to
|
|
||||||
.BR NULL
|
|
||||||
and archive the returned entry as long as it is not
|
|
||||||
.BR NULL.
|
|
||||||
.RE
|
|
||||||
.SH RETURN VALUES
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_linkresolver_new\fP()
|
|
||||||
returns
|
|
||||||
.BR NULL
|
|
||||||
on
|
|
||||||
\fBmalloc\fP(3)
|
|
||||||
failures.
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBarchive_entry\fP(3)
|
|
|
@ -1,49 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY_MISC 3 "April 15, 2019" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_symlink_type\fP,
|
|
||||||
\fB\%archive_entry_set_symlink_type\fP
|
|
||||||
\- miscellaneous functions for manipulating properties of archive_entry
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_symlink_type\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_symlink_type\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
The function
|
|
||||||
\fB\%archive_entry_symlink_type\fP()
|
|
||||||
returns and the function
|
|
||||||
\fB\%archive_entry_set_symlink_type\fP()
|
|
||||||
sets the type of the symbolic link stored in an archive entry.
|
|
||||||
These functions
|
|
||||||
have special meaning on operating systems that support multiple symbolic link
|
|
||||||
types (e.g. Microsoft Windows).
|
|
||||||
.PP
|
|
||||||
Supported values are:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
AE_SYMLINK_TYPE_UNDEFINED
|
|
||||||
Symbolic link target type is not defined (default on unix systems)
|
|
||||||
.TP
|
|
||||||
AE_SYMLINK_TYPE_FILE
|
|
||||||
Symbolic link points to a file
|
|
||||||
.TP
|
|
||||||
AE_SYMLINK_TYPE_DIRECTORY
|
|
||||||
Symbolic link points to a directory
|
|
||||||
.RE
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBarchive_entry\fP(3),
|
|
||||||
\fBarchive_entry_paths\fP(3),
|
|
||||||
\fBarchive_entry_stat\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
|
@ -1,188 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY_PATHS 3 "February 2, 2012" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_hardlink\fP,
|
|
||||||
\fB\%archive_entry_hardlink_w\fP,
|
|
||||||
\fB\%archive_entry_set_hardlink\fP,
|
|
||||||
\fB\%archive_entry_copy_hardlink\fP,
|
|
||||||
\fB\%archive_entry_copy_hardlink_w\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\%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\%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_set_symlink\fP,
|
|
||||||
\fB\%archive_entry_copy_symlink\fP,
|
|
||||||
\fB\%archive_entry_copy_symlink_w\fP,
|
|
||||||
\fB\%archive_entry_update_symlink_utf8\fP
|
|
||||||
\- functions for manipulating path names in archive entry descriptions
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_hardlink\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIconst wchar_t *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_hardlink_w\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_hardlink\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_hardlink\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_hardlink_w\fP(\fI\%struct\ archive_entry\ *a\ \fP, \fI\%const\fP, \fI\%wchar_t\fP, \fI\%*path"\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_update_hardlink_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_link\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_link\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%\ const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_link_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%\ const\ wchar_t\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_update_link_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%\ const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_pathname\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIconst wchar_t *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_pathname_w\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_pathname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_pathname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_pathname_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_update_pathname_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_sourcepath\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_sourcepath\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_symlink\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIconst wchar_t *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_symlink_w\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_symlink\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_symlink\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_symlink_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *path\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_update_symlink_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *path\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
Path names supported by
|
|
||||||
\fBarchive_entry\fP(3):
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
hardlink
|
|
||||||
Destination of the hardlink.
|
|
||||||
.TP
|
|
||||||
link
|
|
||||||
Update only.
|
|
||||||
For a symlink, update the destination.
|
|
||||||
Otherwise, make the entry a hardlink and alter
|
|
||||||
the destination for that.
|
|
||||||
.TP
|
|
||||||
pathname
|
|
||||||
Path in the archive
|
|
||||||
.TP
|
|
||||||
sourcepath
|
|
||||||
Path on the disk for use by
|
|
||||||
\fBarchive_read_disk\fP(3).
|
|
||||||
.TP
|
|
||||||
symlink
|
|
||||||
Destination of the symbolic link.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Path names can be provided in one of three different ways:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
char *
|
|
||||||
Multibyte strings in the current locale.
|
|
||||||
.TP
|
|
||||||
wchar_t *
|
|
||||||
Wide character strings in the current locale.
|
|
||||||
The accessor functions are named
|
|
||||||
\fB\%XXX_w\fP().
|
|
||||||
.TP
|
|
||||||
UTF-8
|
|
||||||
Unicode strings encoded as UTF-8.
|
|
||||||
These are convenience functions to update both the multibyte and wide
|
|
||||||
character strings at the same time.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
The sourcepath is a pure filesystem concept and never stored in an
|
|
||||||
archive directly.
|
|
||||||
.PP
|
|
||||||
For that reason, it is only available as multibyte string.
|
|
||||||
The link path is a convenience function for conditionally setting
|
|
||||||
hardlink or symlink destination.
|
|
||||||
It doesn't have a corresponding get accessor function.
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_set_XXX\fP()
|
|
||||||
is an alias for
|
|
||||||
\fB\%archive_entry_copy_XXX\fP().
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBarchive_entry\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
|
@ -1,231 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY_PERMS 3 "February 2, 2012" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_gid\fP,
|
|
||||||
\fB\%archive_entry_set_gid\fP,
|
|
||||||
\fB\%archive_entry_uid\fP,
|
|
||||||
\fB\%archive_entry_set_uid\fP,
|
|
||||||
\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_set_uname\fP,
|
|
||||||
\fB\%archive_entry_copy_uname\fP,
|
|
||||||
\fB\%archive_entry_copy_uname_w\fP,
|
|
||||||
\fB\%archive_entry_update_uname_utf8\fP,
|
|
||||||
\fB\%archive_entry_gname\fP,
|
|
||||||
\fB\%archive_entry_gname_w\fP,
|
|
||||||
\fB\%archive_entry_set_gname\fP,
|
|
||||||
\fB\%archive_entry_copy_gname\fP,
|
|
||||||
\fB\%archive_entry_copy_gname_w\fP,
|
|
||||||
\fB\%archive_entry_update_gname_utf8\fP,
|
|
||||||
\fB\%archive_entry_fflags\fP,
|
|
||||||
\fB\%archive_entry_fflags_text\fP,
|
|
||||||
\fB\%archive_entry_set_fflags\fP,
|
|
||||||
\fB\%archive_entry_copy_fflags_text\fP,
|
|
||||||
\fB\%archive_entry_copy_fflags_text_w\fP
|
|
||||||
\- functions for manipulating ownership and permissions in archive entry descriptions
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fIgid_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_gid\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_gid\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%gid_t\ gid\fP);
|
|
||||||
.br
|
|
||||||
\fIuid_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_uid\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_uid\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%uid_t\ uid\fP);
|
|
||||||
.br
|
|
||||||
\fImode_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_perm\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_perm\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%mode_t\ mode\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_strmode\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_gname\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIconst wchar_t *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_gname_w\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_gname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_gname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_gname_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_update_gname_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_uname\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIconst wchar_t *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_uname_w\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_uname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_uname\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_uname_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_update_uname_utf8\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *name\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_fflags\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%unsigned\ long\ *set_bits\fP, \fI\%unsigned\ long\ *clear_bits\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_fflags_text\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_fflags\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%unsigned\ long\ set_bits\fP, \fI\%unsigned\ long\ clear_bits\fP);
|
|
||||||
.br
|
|
||||||
\fIconst char *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_fflags_text\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ char\ *text\fP);
|
|
||||||
.br
|
|
||||||
\fIconst wchar_t *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_fflags_text_w\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ wchar_t\ *text\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
.SS User id, group id and mode
|
|
||||||
The functions
|
|
||||||
\fB\%archive_entry_uid\fP(),
|
|
||||||
\fB\%archive_entry_gid\fP(),
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_perm\fP()
|
|
||||||
can be used to extract the user id, group id and permission from the given entry.
|
|
||||||
The corresponding functions
|
|
||||||
\fB\%archive_entry_set_uid\fP(),
|
|
||||||
\fB\%archive_entry_set_gid\fP(),
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_set_perm\fP()
|
|
||||||
store the given user id, group id and permission in the entry.
|
|
||||||
The permission is also set as a side effect of calling
|
|
||||||
\fB\%archive_entry_set_mode\fP().
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_strmode\fP()
|
|
||||||
returns a string representation of the permission as used by the long mode of
|
|
||||||
\fBls\fP(1).
|
|
||||||
.SS User and group name
|
|
||||||
User and group names can be provided in one of three different ways:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
char *
|
|
||||||
Multibyte strings in the current locale.
|
|
||||||
.TP
|
|
||||||
wchar_t *
|
|
||||||
Wide character strings in the current locale.
|
|
||||||
The accessor functions are named
|
|
||||||
\fB\%XXX_w\fP().
|
|
||||||
.TP
|
|
||||||
UTF-8
|
|
||||||
Unicode strings encoded as UTF-8.
|
|
||||||
These are convenience functions to update both the multibyte and wide
|
|
||||||
character strings at the same time.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\fB\%archive_entry_set_XXX\fP()
|
|
||||||
is an alias for
|
|
||||||
\fB\%archive_entry_copy_XXX\fP().
|
|
||||||
.SS 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 set a text format and request a text format,
|
|
||||||
you will get back the same text, even if it is ill-formed.
|
|
||||||
If you need to canonicalize a textual flags string, you should first set the
|
|
||||||
text form, then request the bitmap form, then use that to set the bitmap form.
|
|
||||||
Setting the bitmap format will clear the internal text representation
|
|
||||||
and force it to be reconstructed when you next request the text form.
|
|
||||||
.PP
|
|
||||||
The bitmap format consists of two integers, one containing bits
|
|
||||||
that should be set, the other specifying bits that should be
|
|
||||||
cleared.
|
|
||||||
Bits not mentioned in either bitmap will be ignored.
|
|
||||||
Usually, the bitmap of bits to be cleared will be set to zero.
|
|
||||||
In unusual circumstances, you can force a fully-specified set
|
|
||||||
of file flags by setting the bitmap of flags to clear to the complement
|
|
||||||
of the bitmap of flags to set.
|
|
||||||
(This differs from
|
|
||||||
\fBfflagstostr\fP(3),
|
|
||||||
which only includes names for set bits.)
|
|
||||||
Converting a bitmap to a textual string is a platform-specific
|
|
||||||
operation; bits that are not meaningful on the current platform
|
|
||||||
will be ignored.
|
|
||||||
.PP
|
|
||||||
The canonical text format is a comma-separated list of flag names.
|
|
||||||
The
|
|
||||||
\fB\%archive_entry_copy_fflags_text\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_copy_fflags_text_w\fP()
|
|
||||||
functions parse the provided text and set the internal bitmap values.
|
|
||||||
This is a platform-specific operation; names that are not meaningful
|
|
||||||
on the current platform will be ignored.
|
|
||||||
The function returns a pointer to the start of the first name that was not
|
|
||||||
recognized, or NULL if every name was recognized.
|
|
||||||
Note that every name \(em including names that follow an unrecognized
|
|
||||||
name \(em will be evaluated, and the bitmaps will be set to reflect
|
|
||||||
every name that is recognized.
|
|
||||||
(In particular, this differs from
|
|
||||||
\fBstrtofflags\fP(3),
|
|
||||||
which stops parsing at the first unrecognized name.)
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBarchive_entry\fP(3),
|
|
||||||
\fBarchive_entry_acl\fP(3),
|
|
||||||
\fBarchive_read_disk\fP(3),
|
|
||||||
\fBarchive_write_disk\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
||||||
.SH BUGS
|
|
||||||
.ad l
|
|
||||||
The platform types
|
|
||||||
Vt uid_t
|
|
||||||
and
|
|
||||||
Vt gid_t
|
|
||||||
are often 16 or 32 bit wide.
|
|
||||||
In this case it is possible that the ids can not be correctly restored
|
|
||||||
from archives and get truncated.
|
|
|
@ -1,320 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY_STAT 3 "February 2, 2012" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_stat\fP,
|
|
||||||
\fB\%archive_entry_copy_stat\fP,
|
|
||||||
\fB\%archive_entry_filetype\fP,
|
|
||||||
\fB\%archive_entry_set_filetype\fP,
|
|
||||||
\fB\%archive_entry_mode\fP,
|
|
||||||
\fB\%archive_entry_set_mode\fP,
|
|
||||||
\fB\%archive_entry_size\fP,
|
|
||||||
\fB\%archive_entry_size_is_set\fP,
|
|
||||||
\fB\%archive_entry_set_size\fP,
|
|
||||||
\fB\%archive_entry_unset_size\fP,
|
|
||||||
\fB\%archive_entry_dev\fP,
|
|
||||||
\fB\%archive_entry_set_dev\fP,
|
|
||||||
\fB\%archive_entry_dev_is_set\fP,
|
|
||||||
\fB\%archive_entry_devmajor\fP,
|
|
||||||
\fB\%archive_entry_set_devmajor\fP,
|
|
||||||
\fB\%archive_entry_devminor\fP,
|
|
||||||
\fB\%archive_entry_set_devminor\fP,
|
|
||||||
\fB\%archive_entry_ino\fP,
|
|
||||||
\fB\%archive_entry_set_ino\fP,
|
|
||||||
\fB\%archive_entry_ino_is_set\fP,
|
|
||||||
\fB\%archive_entry_ino64\fP,
|
|
||||||
\fB\%archive_entry_set_ino64\fP,
|
|
||||||
\fB\%archive_entry_nlink\fP,
|
|
||||||
\fB\%archive_entry_rdev\fP,
|
|
||||||
\fB\%archive_entry_set_rdev\fP,
|
|
||||||
\fB\%archive_entry_rdevmajor\fP,
|
|
||||||
\fB\%archive_entry_set_rdevmajor\fP,
|
|
||||||
\fB\%archive_entry_rdevminor\fP,
|
|
||||||
\fB\%archive_entry_set_rdevminor\fP
|
|
||||||
\- accessor functions for manipulating archive entry descriptions
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fIconst struct stat *\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_stat\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_copy_stat\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%const\ struct\ stat\ *sb\fP);
|
|
||||||
.br
|
|
||||||
\fImode_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_filetype\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_filetype\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%unsigned\ int\ type\fP);
|
|
||||||
.br
|
|
||||||
\fImode_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_mode\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_mode\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%mode_t\ mode\fP);
|
|
||||||
.br
|
|
||||||
\fIint64_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_size\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_size_is_set\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_size\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int64_t\ size\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_unset_size\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIdev_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_dev\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_dev\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%dev_t\ dev\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_dev_is_set\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIdev_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_devmajor\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_devmajor\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%dev_t\ major\fP);
|
|
||||||
.br
|
|
||||||
\fIdev_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_devminor\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_devminor\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%dev_t\ minor\fP);
|
|
||||||
.br
|
|
||||||
\fIino_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_ino\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_ino\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%unsigned\ long\ ino\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_ino_is_set\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIint64_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_ino64\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_ino64\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%int64_t\ ino\fP);
|
|
||||||
.br
|
|
||||||
\fIunsigned int\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_nlink\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_nlink\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%unsigned\ int\ count\fP);
|
|
||||||
.br
|
|
||||||
\fIdev_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_rdev\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIdev_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_rdevmajor\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIdev_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_rdevminor\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_rdev\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%dev_t\ dev\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_rdevmajor\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%dev_t\ major\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_rdevminor\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%dev_t\ minor\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
.SS Copying to and from Vt struct stat
|
|
||||||
The function
|
|
||||||
\fB\%archive_entry_stat\fP()
|
|
||||||
converts the various fields stored in the archive entry to the format
|
|
||||||
used by
|
|
||||||
\fBstat\fP(2).
|
|
||||||
The return value remains valid until either
|
|
||||||
\fB\%archive_entry_clear\fP()
|
|
||||||
or
|
|
||||||
\fB\%archive_entry_free\fP()
|
|
||||||
is called.
|
|
||||||
It is not affected by calls to the set accessor functions.
|
|
||||||
It currently sets the following values in
|
|
||||||
Vt struct stat:
|
|
||||||
Vt st_atime,
|
|
||||||
Vt st_ctime,
|
|
||||||
Vt st_dev,
|
|
||||||
Vt st_gid,
|
|
||||||
Vt st_ino,
|
|
||||||
Vt st_mode,
|
|
||||||
Vt st_mtime,
|
|
||||||
Vt st_nlink,
|
|
||||||
Vt st_rdev,
|
|
||||||
Vt st_size,
|
|
||||||
Vt st_uid.
|
|
||||||
In addition,
|
|
||||||
Vt st_birthtime
|
|
||||||
and high-precision information for time-related fields
|
|
||||||
will be included on platforms that support it.
|
|
||||||
.PP
|
|
||||||
The function
|
|
||||||
\fB\%archive_entry_copy_stat\fP()
|
|
||||||
copies fields from the platform's
|
|
||||||
Vt struct stat.
|
|
||||||
Fields not provided by
|
|
||||||
Vt struct stat
|
|
||||||
are unchanged.
|
|
||||||
.SS General accessor functions
|
|
||||||
The functions
|
|
||||||
\fB\%archive_entry_filetype\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_set_filetype\fP()
|
|
||||||
get respectively set the filetype.
|
|
||||||
The file type is one of the following constants:
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
AE_IFREG
|
|
||||||
Regular file
|
|
||||||
.TP
|
|
||||||
AE_IFLNK
|
|
||||||
Symbolic link
|
|
||||||
.TP
|
|
||||||
AE_IFSOCK
|
|
||||||
Socket
|
|
||||||
.TP
|
|
||||||
AE_IFCHR
|
|
||||||
Character device
|
|
||||||
.TP
|
|
||||||
AE_IFBLK
|
|
||||||
Block device
|
|
||||||
.TP
|
|
||||||
AE_IFDIR
|
|
||||||
Directory
|
|
||||||
.TP
|
|
||||||
AE_IFIFO
|
|
||||||
Named pipe (fifo)
|
|
||||||
.RE
|
|
||||||
Not all file types are supported by all platforms.
|
|
||||||
The constants used by
|
|
||||||
\fBstat\fP(2)
|
|
||||||
may have different numeric values from the
|
|
||||||
corresponding constants above.
|
|
||||||
.PP
|
|
||||||
The functions
|
|
||||||
\fB\%archive_entry_mode\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_set_mode\fP()
|
|
||||||
get/set a combination of file type and permissions and provide the
|
|
||||||
equivalent of
|
|
||||||
\fIst_mode\fP.
|
|
||||||
Use of
|
|
||||||
\fB\%archive_entry_filetype\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_perm\fP()
|
|
||||||
for getting and
|
|
||||||
\fB\%archive_entry_set_filetype\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_set_perm\fP()
|
|
||||||
for setting is recommended.
|
|
||||||
.PP
|
|
||||||
The function
|
|
||||||
\fB\%archive_entry_size\fP()
|
|
||||||
returns the file size, if it has been set, and 0 otherwise.
|
|
||||||
\fB\%archive_entry_size\fP()
|
|
||||||
can be used to query that status.
|
|
||||||
\fB\%archive_entry_set_size\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_unset_size\fP()
|
|
||||||
set and unset the size, respectively.
|
|
||||||
.PP
|
|
||||||
The number of references (hardlinks) can be obtained by calling
|
|
||||||
\fB\%archive_entry_nlink\fP()
|
|
||||||
and set with
|
|
||||||
\fB\%archive_entry_set_nlink\fP().
|
|
||||||
.SS Identifying unique files
|
|
||||||
The functions
|
|
||||||
\fB\%archive_entry_dev\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_ino64\fP()
|
|
||||||
are used by
|
|
||||||
\fBarchive_entry_linkify\fP(3)
|
|
||||||
to find hardlinks.
|
|
||||||
The pair of device and inode is supposed to identify hardlinked files.
|
|
||||||
.PP
|
|
||||||
The device major and minor number can be obtained independently using
|
|
||||||
\fB\%archive_entry_devmajor\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_devminor\fP().
|
|
||||||
The device can be set either via
|
|
||||||
\fB\%archive_entry_set_dev\fP()
|
|
||||||
or by the combination of major and minor number using
|
|
||||||
\fB\%archive_entry_set_devmajor\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_entry_set_devminor\fP().
|
|
||||||
.PP
|
|
||||||
The inode number can be obtained using
|
|
||||||
\fB\%archive_entry_ino\fP().
|
|
||||||
This is a legacy interface that uses the platform
|
|
||||||
Vt ino_t,
|
|
||||||
which may be very small.
|
|
||||||
To set the inode number,
|
|
||||||
\fB\%archive_entry_set_ino64\fP()
|
|
||||||
is the preferred interface.
|
|
||||||
.SS Accessor functions for block and character devices
|
|
||||||
Block and character devices are characterised either using a device number
|
|
||||||
or a pair of major and minor number.
|
|
||||||
The combined device number can be obtained with
|
|
||||||
\fB\%archive_device_rdev\fP()
|
|
||||||
and set with
|
|
||||||
\fB\%archive_device_set_rdev\fP().
|
|
||||||
The major and minor numbers are accessed by
|
|
||||||
\fB\%archive_device_rdevmajor\fP(),
|
|
||||||
\fB\%archive_device_rdevminor\fP()
|
|
||||||
\fB\%archive_device_set_rdevmajor\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_device_set_rdevminor\fP().
|
|
||||||
.PP
|
|
||||||
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.
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBstat\fP(2),
|
|
||||||
\fBarchive_entry_acl\fP(3),
|
|
||||||
\fBarchive_entry_perms\fP(3),
|
|
||||||
\fBarchive_entry_time\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
|
@ -1,146 +0,0 @@
|
||||||
.TH ARCHIVE_ENTRY_TIME 3 "February 2, 2012" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_entry_atime\fP,
|
|
||||||
\fB\%archive_entry_atime_nsec\fP,
|
|
||||||
\fB\%archive_entry_atime_is_set\fP,
|
|
||||||
\fB\%archive_entry_set_atime\fP,
|
|
||||||
\fB\%archive_entry_unset_atime\fP,
|
|
||||||
\fB\%archive_entry_birthtime\fP,
|
|
||||||
\fB\%archive_entry_birthtime_nsec\fP,
|
|
||||||
\fB\%archive_entry_birthtime_is_set\fP,
|
|
||||||
\fB\%archive_entry_set_birthtime\fP,
|
|
||||||
\fB\%archive_entry_unset_birthtime\fP,
|
|
||||||
\fB\%archive_entry_ctime\fP,
|
|
||||||
\fB\%archive_entry_ctime_nsec\fP,
|
|
||||||
\fB\%archive_entry_ctime_is_set\fP,
|
|
||||||
\fB\%archive_entry_set_ctime\fP,
|
|
||||||
\fB\%archive_entry_unset_ctime\fP,
|
|
||||||
\fB\%archive_entry_mtime\fP,
|
|
||||||
\fB\%archive_entry_mtime_nsec\fP,
|
|
||||||
\fB\%archive_entry_mtime_is_set\fP,
|
|
||||||
\fB\%archive_entry_set_mtime\fP,
|
|
||||||
\fB\%archive_entry_unset_mtime\fP
|
|
||||||
\- functions for manipulating times in archive entry descriptions
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive_entry.h>\fP
|
|
||||||
.br
|
|
||||||
\fItime_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_atime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIlong\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_atime_nsec\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_atime_is_set\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_atime\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%time_t\ sec\fP, \fI\%long\ nanosec\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_unset_atime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fItime_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_birthtime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIlong\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_birthtime_nsec\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_birthtime_is_set\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_birthtime\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%time_t\ sec\fP, \fI\%long\ nanosec\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_unset_birthtime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fItime_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_ctime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIlong\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_ctime_nsec\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_ctime_is_set\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_ctime\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%time_t\ sec\fP, \fI\%long\ nanosec\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_unset_ctime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fItime_t\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_mtime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIlong\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_mtime_nsec\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_mtime_is_set\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_set_mtime\fP(\fI\%struct\ archive_entry\ *a\fP, \fI\%time_t\ sec\fP, \fI\%long\ nanosec\fP);
|
|
||||||
.br
|
|
||||||
\fIvoid\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_entry_unset_mtime\fP(\fI\%struct\ archive_entry\ *a\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
These functions create and manipulate the time fields in an
|
|
||||||
Vt archive_entry.
|
|
||||||
Supported time fields are atime (access time), birthtime (creation time),
|
|
||||||
ctime (last time an inode property was changed) and mtime (modification time).
|
|
||||||
.PP
|
|
||||||
\fBlibarchive\fP(3)
|
|
||||||
provides a high-resolution interface.
|
|
||||||
The timestamps are truncated automatically depending on the archive format
|
|
||||||
(for archiving) or the filesystem capabilities (for restoring).
|
|
||||||
.PP
|
|
||||||
All timestamp fields are optional.
|
|
||||||
The
|
|
||||||
\fB\%XXX_unset\fP()
|
|
||||||
functions can be used to mark the corresponding field as missing.
|
|
||||||
The current state can be queried using
|
|
||||||
\fB\%XXX_is_set\fP().
|
|
||||||
Unset time fields have a second and nanosecond field of 0.
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBarchive_entry\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
||||||
.SH HISTORY
|
|
||||||
.ad l
|
|
||||||
The
|
|
||||||
\fB\%libarchive\fP
|
|
||||||
library first appeared in
|
|
||||||
FreeBSD 5.3.
|
|
||||||
.SH AUTHORS
|
|
||||||
.ad l
|
|
||||||
-nosplit
|
|
||||||
The
|
|
||||||
\fB\%libarchive\fP
|
|
||||||
library was written by
|
|
||||||
Tim Kientzle \%<kientzle@acm.org.>
|
|
|
@ -1,219 +0,0 @@
|
||||||
.TH ARCHIVE_READ 3 "February 2, 2012" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_read\fP
|
|
||||||
\- functions for reading streaming archives
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive.h>\fP
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
These functions provide a complete API for reading streaming archives.
|
|
||||||
The general process is to first create the
|
|
||||||
Tn struct archive
|
|
||||||
object, set options, initialize the reader, iterate over the archive
|
|
||||||
headers and associated data, then close the archive and release all
|
|
||||||
resources.
|
|
||||||
.SS Create archive object
|
|
||||||
See
|
|
||||||
\fBarchive_read_new\fP(3).
|
|
||||||
.PP
|
|
||||||
To read an archive, you must first obtain an initialized
|
|
||||||
Tn struct archive
|
|
||||||
object from
|
|
||||||
\fB\%archive_read_new\fP().
|
|
||||||
.SS Enable filters and formats
|
|
||||||
See
|
|
||||||
\fBarchive_read_filter\fP(3)
|
|
||||||
and
|
|
||||||
\fBarchive_read_format\fP(3).
|
|
||||||
.PP
|
|
||||||
You can then modify this object for the desired operations with the
|
|
||||||
various
|
|
||||||
\fB\%archive_read_set_XXX\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_read_support_XXX\fP()
|
|
||||||
functions.
|
|
||||||
In particular, you will need to invoke appropriate
|
|
||||||
\fB\%archive_read_support_XXX\fP()
|
|
||||||
functions to enable the corresponding compression 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
|
|
||||||
\fB\%archive_read_support_filter_all\fP()
|
|
||||||
and
|
|
||||||
\fB\%archive_read_support_format_all\fP()
|
|
||||||
to enable auto-detect for all formats and compression types
|
|
||||||
currently supported by the library.
|
|
||||||
.SS Set options
|
|
||||||
See
|
|
||||||
\fBarchive_read_set_options\fP(3).
|
|
||||||
.SS Open archive
|
|
||||||
See
|
|
||||||
\fBarchive_read_open\fP(3).
|
|
||||||
.PP
|
|
||||||
Once you have prepared the
|
|
||||||
Tn struct archive
|
|
||||||
object, you call
|
|
||||||
\fB\%archive_read_open\fP()
|
|
||||||
to actually open the archive and prepare it for reading.
|
|
||||||
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,
|
|
||||||
\fIFILE *\fP
|
|
||||||
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.
|
|
||||||
.SS Consume archive
|
|
||||||
See
|
|
||||||
\fBarchive_read_header\fP(3),
|
|
||||||
\fBarchive_read_data\fP(3)
|
|
||||||
and
|
|
||||||
\fBarchive_read_extract\fP(3).
|
|
||||||
.PP
|
|
||||||
Each archive entry consists of a header followed by a certain
|
|
||||||
amount of data.
|
|
||||||
You can obtain the next header with
|
|
||||||
\fB\%archive_read_next_header\fP(),
|
|
||||||
which returns a pointer to an
|
|
||||||
Tn struct archive_entry
|
|
||||||
structure with information 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
|
|
||||||
\fB\%archive_read_data\fP()
|
|
||||||
(which works much like the
|
|
||||||
\fBread\fP(2)
|
|
||||||
system call)
|
|
||||||
to read this data from the archive, or
|
|
||||||
\fB\%archive_read_data_block\fP()
|
|
||||||
which provides a slightly more efficient interface.
|
|
||||||
You may prefer to use the higher-level
|
|
||||||
\fB\%archive_read_data_skip\fP(),
|
|
||||||
which reads and discards the data for this entry,
|
|
||||||
\fB\%archive_read_data_into_fd\fP(),
|
|
||||||
which copies the data to the provided file descriptor, or
|
|
||||||
\fB\%archive_read_extract\fP(),
|
|
||||||
which recreates the specified entry on disk and copies data
|
|
||||||
from the archive.
|
|
||||||
In particular, note that
|
|
||||||
\fB\%archive_read_extract\fP()
|
|
||||||
uses the
|
|
||||||
Tn 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.
|
|
||||||
.SS Release resources
|
|
||||||
See
|
|
||||||
\fBarchive_read_free\fP(3).
|
|
||||||
.PP
|
|
||||||
Once you have finished reading data from the archive, you
|
|
||||||
should call
|
|
||||||
\fB\%archive_read_close\fP()
|
|
||||||
to close the archive, then call
|
|
||||||
\fB\%archive_read_free\fP()
|
|
||||||
to release all resources, including all memory allocated by the library.
|
|
||||||
.SH EXAMPLES
|
|
||||||
.ad l
|
|
||||||
The following illustrates basic usage of the library.
|
|
||||||
In this example,
|
|
||||||
the callback functions are simply wrappers around the standard
|
|
||||||
\fBopen\fP(2),
|
|
||||||
\fBread\fP(2),
|
|
||||||
and
|
|
||||||
\fBclose\fP(2)
|
|
||||||
system calls.
|
|
||||||
.RS 4
|
|
||||||
.nf
|
|
||||||
void
|
|
||||||
list_archive(const char *name)
|
|
||||||
{
|
|
||||||
struct mydata *mydata;
|
|
||||||
struct archive *a;
|
|
||||||
struct archive_entry *entry;
|
|
||||||
mydata = malloc(sizeof(struct mydata));
|
|
||||||
a = archive_read_new();
|
|
||||||
mydata->name = name;
|
|
||||||
archive_read_support_filter_all(a);
|
|
||||||
archive_read_support_format_all(a);
|
|
||||||
archive_read_open(a, mydata, myopen, myread, myclose);
|
|
||||||
while (archive_read_next_header(a, &entry) == ARCHIVE_OK) {
|
|
||||||
printf("%s\en",archive_entry_pathname(entry));
|
|
||||||
archive_read_data_skip(a);
|
|
||||||
}
|
|
||||||
archive_read_free(a);
|
|
||||||
free(mydata);
|
|
||||||
}
|
|
||||||
la_ssize_t
|
|
||||||
myread(struct archive *a, void *client_data, const void **buff)
|
|
||||||
{
|
|
||||||
struct mydata *mydata = client_data;
|
|
||||||
*buff = mydata->buff;
|
|
||||||
return (read(mydata->fd, mydata->buff, 10240));
|
|
||||||
}
|
|
||||||
int
|
|
||||||
myopen(struct archive *a, void *client_data)
|
|
||||||
{
|
|
||||||
struct mydata *mydata = client_data;
|
|
||||||
mydata->fd = open(mydata->name, O_RDONLY);
|
|
||||||
return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL);
|
|
||||||
}
|
|
||||||
int
|
|
||||||
myclose(struct archive *a, void *client_data)
|
|
||||||
{
|
|
||||||
struct mydata *mydata = client_data;
|
|
||||||
if (mydata->fd > 0)
|
|
||||||
close(mydata->fd);
|
|
||||||
return (ARCHIVE_OK);
|
|
||||||
}
|
|
||||||
.RE
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBtar\fP(1),
|
|
||||||
\fBarchive_read_data\fP(3),
|
|
||||||
\fBarchive_read_extract\fP(3),
|
|
||||||
\fBarchive_read_filter\fP(3),
|
|
||||||
\fBarchive_read_format\fP(3),
|
|
||||||
\fBarchive_read_header\fP(3),
|
|
||||||
\fBarchive_read_new\fP(3),
|
|
||||||
\fBarchive_read_open\fP(3),
|
|
||||||
\fBarchive_read_set_options\fP(3),
|
|
||||||
\fBarchive_util\fP(3),
|
|
||||||
\fBlibarchive\fP(3),
|
|
||||||
\fBtar\fP(5)
|
|
||||||
.SH HISTORY
|
|
||||||
.ad l
|
|
||||||
The
|
|
||||||
\fB\%libarchive\fP
|
|
||||||
library first appeared in
|
|
||||||
FreeBSD 5.3.
|
|
||||||
.SH AUTHORS
|
|
||||||
.ad l
|
|
||||||
-nosplit
|
|
||||||
The
|
|
||||||
\fB\%libarchive\fP
|
|
||||||
library was written by
|
|
||||||
Tim Kientzle \%<kientzle@acm.org.>
|
|
||||||
.SH BUGS
|
|
||||||
.ad l
|
|
||||||
Many traditional archiver programs treat
|
|
||||||
empty files as valid empty archives.
|
|
||||||
For example, many implementations of
|
|
||||||
\fBtar\fP(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.
|
|
|
@ -1,49 +0,0 @@
|
||||||
.TH ARCHIVE_READ_ADD_PASSPHRASE 3 "September 14, 2014" ""
|
|
||||||
.SH NAME
|
|
||||||
.ad l
|
|
||||||
\fB\%archive_read_add_passphrase\fP,
|
|
||||||
\fB\%archive_read_set_passphrase_callback\fP
|
|
||||||
\- functions for reading encrypted archives
|
|
||||||
.SH LIBRARY
|
|
||||||
.ad l
|
|
||||||
Streaming Archive Library (libarchive, -larchive)
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.ad l
|
|
||||||
\fB#include <archive.h>\fP
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_read_add_passphrase\fP(\fI\%struct\ archive\ *\fP, \fI\%const\ char\ *passphrase\fP);
|
|
||||||
.br
|
|
||||||
\fIint\fP
|
|
||||||
.br
|
|
||||||
\fB\%archive_read_set_passphrase_callback\fP(\fI\%struct\ archive\ *\fP, \fI\%void\ *client_data\fP, \fI\%archive_passphrase_callback\ *\fP);
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.ad l
|
|
||||||
.RS 5
|
|
||||||
.TP
|
|
||||||
\fB\%archive_read_add_passphrase\fP()
|
|
||||||
Register passphrases for reading an encryption archive.
|
|
||||||
If
|
|
||||||
\fIpassphrase\fP
|
|
||||||
is
|
|
||||||
.BR NULL
|
|
||||||
or empty, this function will do nothing and
|
|
||||||
\fBARCHIVE_FAILED\fP
|
|
||||||
will be returned.
|
|
||||||
Otherwise,
|
|
||||||
\fBARCHIVE_OK\fP
|
|
||||||
will be returned.
|
|
||||||
.TP
|
|
||||||
\fB\%archive_read_set_passphrase_callback\fP()
|
|
||||||
Register a callback function that will be invoked to get a passphrase
|
|
||||||
for decryption after trying all the passphrases registered by the
|
|
||||||
\fB\%archive_read_add_passphrase\fP()
|
|
||||||
function failed.
|
|
||||||
.RE
|
|
||||||
.SH SEE ALSO
|
|
||||||
.ad l
|
|
||||||
\fBtar\fP(1),
|
|
||||||
\fBarchive_read\fP(3),
|
|
||||||
\fBarchive_read_set_options\fP(3),
|
|
||||||
\fBlibarchive\fP(3)
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue