Update vendor/libarchive to 3.7.3

New features:
  #1941 uudecode filter: support file name and file mode in raw mode
  #1943 7-zip reader: translate Windows permissions into UNIX
        permissions
  #1962 zstd filter now supports the "long" write option
  #2012 add trailing letter b to bsdtar(1) substitute pattern
  #2031 PCRE2 support
  #2054 add support for long options "--group" and "--owner" to tar(1)

Security fixes:
  #2101 Fix possible vulnerability in tar error reporting introduced
        in f27c173

Important bugfixes:
  #1974 ISO9660: preserve the natural order of links
  #2105 rar5: fix infinite loop if during rar5 decompression the last
        block produced no data
  #2027 xz filter: fix incorrect eof at the end of an lzip member
  #2043 zip: fix end-of-data marker processing when decompressing zip
        archives

Obtained from:		libarchive
Libarchive commit:	4fcc02d906cca4b9e21a78a833f1142a2689ec52
This commit is contained in:
Martin Matuska
2024-04-11 15:37:34 +02:00
parent a5913a473b
commit a509d68f27
760 changed files with 6165 additions and 1759 deletions
+2 -2
View File
@@ -10,9 +10,9 @@ FreeBSD_task:
BS: cmake
matrix:
freebsd_instance:
image_family: freebsd-13-2
image_family: freebsd-14-0
freebsd_instance:
image_family: freebsd-12-4
image_family: freebsd-13-2
prepare_script:
- ./build/ci/cirrus_ci/ci.sh prepare
configure_script:
+15
View File
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
all-actions:
patterns:
- "*"
+20 -9
View File
@@ -2,6 +2,9 @@ name: CI
on: [push, pull_request]
permissions:
contents: read
jobs:
MacOS:
runs-on: macos-13
@@ -9,7 +12,7 @@ jobs:
matrix:
bs: [autotools, cmake]
steps:
- uses: actions/checkout@master
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Install dependencies
run: ./build/ci/github_actions/macos.sh prepare
- name: Autogen
@@ -32,6 +35,7 @@ jobs:
SKIP_OPEN_FD_ERR_TEST: 1
IGNORE_TRAVERSALS_TEST4: 1
MAKE_ARGS: -j
CTEST_OUTPUT_ON_FAILURE: ON
- name: Install
run: ./build/ci/build.sh -a install
env:
@@ -41,7 +45,7 @@ jobs:
run: ./build/ci/build.sh -a artifact
env:
BS: ${{ matrix.bs }}
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: libarchive-macos-${{ matrix.bs }}-${{ github.sha }}
path: libarchive.tar.xz
@@ -53,7 +57,7 @@ jobs:
bs: [autotools, cmake]
crypto: [mbedtls, nettle, openssl]
steps:
- uses: actions/checkout@master
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Update apt cache
run: sudo apt-get update
- name: Install dependencies
@@ -78,6 +82,7 @@ jobs:
BS: ${{ matrix.bs }}
SKIP_OPEN_FD_ERR_TEST: 1
MAKE_ARGS: -j
CTEST_OUTPUT_ON_FAILURE: ON
- name: Install
run: ./build/ci/build.sh -a install
env:
@@ -86,14 +91,14 @@ jobs:
run: ./build/ci/build.sh -a artifact
env:
BS: ${{ matrix.bs }}
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: libarchive-ubuntu-${{ matrix.bs }}-${{ matrix.crypto }}-${{ github.sha }}
path: libarchive.tar.xz
Ubuntu-distcheck:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@master
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Update package definitions
run: sudo apt-get update
- name: Install dependencies
@@ -108,7 +113,7 @@ jobs:
SKIP_OPEN_FD_ERR_TEST: 1
- name: Dist-Artifact
run: ./build/ci/build.sh -a dist-artifact
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: libarchive-${{ github.sha }}
path: libarchive-dist.tar
@@ -116,11 +121,16 @@ jobs:
Windows:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
be: [mingw-gcc, msvc]
steps:
- uses: actions/checkout@master
- name: Install dependencies
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Install mingw
if: ${{ matrix.be=='mingw-gcc' }}
run: choco install mingw
shell: cmd
- name: Install library dependencies
run: ./build/ci/github_actions/ci.cmd deplibs
shell: cmd
env:
@@ -140,6 +150,7 @@ jobs:
shell: cmd
env:
BE: ${{ matrix.be }}
CTEST_OUTPUT_ON_FAILURE: ON
- name: Install
run: ./build/ci/github_actions/ci.cmd install
shell: cmd
@@ -150,7 +161,7 @@ jobs:
shell: cmd
env:
BE: ${{ matrix.be }}
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: libarchive-windows-${{ matrix.be }}-${{ github.sha }}
path: libarchive.zip
+5 -1
View File
@@ -1,5 +1,9 @@
name: CIFuzz
on: [pull_request]
permissions:
contents: read
jobs:
Fuzzing:
runs-on: ubuntu-latest
@@ -17,7 +21,7 @@ jobs:
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
+7 -5
View File
@@ -1,5 +1,8 @@
name: "CodeQL"
permissions:
contents: read
on:
push:
branches: [ "master", "3.5" ]
@@ -14,7 +17,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
@@ -24,18 +26,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
with:
category: "/language:${{ matrix.language }}"
+65
View File
@@ -0,0 +1,65 @@
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Scorecard supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '42 8 * * 0'
push:
branches: [ "master" ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Needed to publish results and get a badge (see publish_results below).
id-token: write
steps:
- name: "Checkout code"
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# you want to enable the Branch-Protection check on a *public* repository
# To create the PAT, follow the steps in
# https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
# - Publish results to OpenSSF REST API for easy access by consumers
# - Allows the repository to include the Scorecard badge.
# - See https://github.com/ossf/scorecard-action#publishing-results.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
with:
sarif_file: results.sarif
+3
View File
@@ -47,6 +47,7 @@ CMakeCache.txt
CMakeFiles/
DartConfiguration.tcl
cmake.tmp/
.vscode/
doc/html/*.html
doc/man/*.1
@@ -74,3 +75,5 @@ test-suite.log
.sw?
.*.sw?
*.pdb
+77 -9
View File
@@ -6,6 +6,9 @@ endif()
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW) #3.12.0 `find_package()`` uses ``<PackageName>_ROOT`` variables.
endif()
if(POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) #3.12.0 `check_include_file()`` and friends use ``CMAKE_REQUIRED_LIBRARIES``.
endif()
#
PROJECT(libarchive C)
#
@@ -20,8 +23,9 @@ endif()
# Release : Release build
# RelWithDebInfo : Release build with Debug Info
# MinSizeRel : Release Min Size build
# None : No build type
IF(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build Type" FORCE)
SET(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build Type" FORCE)
ENDIF(NOT CMAKE_BUILD_TYPE)
# Set a value type to properly display CMAKE_BUILD_TYPE on GUI if the
# value type is "UNINITIALIZED".
@@ -31,12 +35,12 @@ IF("${cached_type}" STREQUAL "UNINITIALIZED")
ENDIF("${cached_type}" STREQUAL "UNINITIALIZED")
# Check the Build Type.
IF(NOT "${CMAKE_BUILD_TYPE}"
MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel|None)\$")
MESSAGE(FATAL_ERROR
"Unknown keyword for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}\n"
"Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel")
"Acceptable keywords: Debug,Release,RelWithDebInfo,MinSizeRel,None")
ENDIF(NOT "${CMAKE_BUILD_TYPE}"
MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel)\$")
MATCHES "^(Debug|Release|RelWithDebInfo|MinSizeRel|None)\$")
# On MacOS, prefer MacPorts libraries to system libraries.
# I haven't come up with a compelling argument for this to be conditional.
@@ -124,8 +128,6 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
# either of the following two, yet neither is supported as of 3.0.2
# - check_linker_flag - does not exist
# - try_compile - does not support linker flags
#
# The CI fails with this on MacOS
IF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
# Place the functions and data into separate sections, allowing the linker
# to garbage collect the unused ones.
@@ -135,6 +137,9 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
# Printing the discarded section is "too much", so enable on demand.
#SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -Wl,--print-gc-sections")
#SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -Wl,--print-gc-sections")
ELSE()
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-dead_strip")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-dead_strip")
ENDIF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
@@ -216,6 +221,7 @@ OPTION(ENABLE_BZip2 "Enable the use of the system BZip2 library if found" ON)
OPTION(ENABLE_LIBXML2 "Enable the use of the system libxml2 library if found" ON)
OPTION(ENABLE_EXPAT "Enable the use of the system EXPAT library if found" ON)
OPTION(ENABLE_PCREPOSIX "Enable the use of the system PCREPOSIX library if found" ON)
OPTION(ENABLE_PCRE2POSIX "Enable the use of the system PCRE2POSIX library if found" ON)
OPTION(ENABLE_LIBGCC "Enable the use of the system LibGCC library if found" ON)
# CNG is used for encrypt/decrypt Zip archives on Windows.
OPTION(ENABLE_CNG "Enable the use of CNG(Crypto Next Generation)" ON)
@@ -523,7 +529,7 @@ IF(LIBLZMA_FOUND)
"#include <lzma.h>\nint main() {return (int)lzma_version_number(); }"
"WITHOUT_LZMA_API_STATIC;LZMA_API_STATIC")
CHECK_C_SOURCE_COMPILES(
"#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}"
"#include <lzma.h>\n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){int ignored __attribute__((unused)); ignored = lzma_stream_encoder_mt(0, 0); return 0;}"
HAVE_LZMA_STREAM_ENCODER_MT)
IF(NOT WITHOUT_LZMA_API_STATIC AND LZMA_API_STATIC)
ADD_DEFINITIONS(-DLZMA_API_STATIC)
@@ -654,7 +660,7 @@ IF(ZSTD_FOUND)
SET(CMAKE_REQUIRED_LIBRARIES ${ZSTD_LIBRARY})
SET(CMAKE_REQUIRED_INCLUDES ${ZSTD_INCLUDE_DIR})
CHECK_FUNCTION_EXISTS(ZSTD_decompressStream HAVE_LIBZSTD)
CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_LIBZSTD_COMPRESSOR)
CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_ZSTD_compressStream)
#
# TODO: test for static library.
#
@@ -1187,7 +1193,7 @@ ENDIF(ENABLE_ICONV)
#
# Find Libxml2
#
IF(ENABLE_LIBXML2)
IF(ENABLE_LIBXML2 AND HAVE_ICONV)
FIND_PACKAGE(LibXml2)
ELSE()
SET(LIBXML2_FOUND FALSE)
@@ -1348,6 +1354,68 @@ IF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCREPOSIX)$"
MARK_AS_ADVANCED(CLEAR LIBGCC_LIBRARIES)
ENDIF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCREPOSIX)$")
IF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCRE2POSIX)$")
#
# If requested, try finding library for PCRE2POSIX
#
IF(ENABLE_LIBGCC)
FIND_PACKAGE(LIBGCC)
ELSE()
MESSAGE(FATAL_ERROR "libgcc not found.")
SET(LIBGCC_FOUND FALSE) # Override cached value
ENDIF()
IF(ENABLE_PCRE2POSIX)
FIND_PACKAGE(PCRE2POSIX)
ELSE()
SET(PCRE2POSIX_FOUND FALSE) # Override cached value
ENDIF()
IF(PCRE2POSIX_FOUND)
INCLUDE_DIRECTORIES(${PCRE2_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${PCRE2POSIX_LIBRARIES})
# Test if a macro is needed for the library.
TRY_MACRO_FOR_LIBRARY(
"${PCRE2_INCLUDE_DIR}" "${PCRE2POSIX_LIBRARIES}"
COMPILES
"#include <pcre2posix.h>\nint main() {regex_t r;return pcre2_regcomp(&r, \"\", 0);}"
"WITHOUT_PCRE2_STATIC;PCRE2_STATIC")
IF(NOT WITHOUT_PCRE2_STATIC AND PCRE2_STATIC)
ADD_DEFINITIONS(-DPCRE2_STATIC)
ELSEIF(NOT WITHOUT_PCRE2_STATIC AND NOT PCRE2_STATIC AND PCRE2_FOUND)
# Determine if pcre2 static libraries are to be used.
LIST(APPEND ADDITIONAL_LIBS ${PCRE2_LIBRARIES})
SET(TMP_LIBRARIES ${PCRE2POSIX_LIBRARIES} ${PCRE2_LIBRARIES})
MESSAGE(STATUS "trying again with -lpcre2-8 included")
TRY_MACRO_FOR_LIBRARY(
"${PCRE2_INCLUDE_DIR}" "${TMP_LIBRARIES}"
COMPILES
"#include <pcre2posix.h>\nint main() {regex_t r;return pcre2_regcomp(&r, \"\", 0);}"
"WITHOUT_PCRE2_STATIC;PCRE2_STATIC")
IF(NOT WITHOUT_PCRE2_STATIC AND PCRE2_STATIC)
ADD_DEFINITIONS(-DPCRE2_STATIC)
ELSEIF(NOT WITHOUT_PCRE2_STATIC AND NOT PCRE2_STATIC AND MSVC AND LIBGCC_FOUND)
# When doing a Visual Studio build using pcre2 static libraries
# built using the mingw toolchain, -lgcc is needed to resolve
# ___chkstk_ms.
MESSAGE(STATUS "Visual Studio build detected, trying again with -lgcc included")
LIST(APPEND ADDITIONAL_LIBS ${LIBGCC_LIBRARIES})
SET(TMP_LIBRARIES ${PCRE2POSIX_LIBRARIES} ${PCRE2_LIBRARIES} ${LIBGCC_LIBRARIES})
TRY_MACRO_FOR_LIBRARY(
"${PCRE2_INCLUDE_DIR}" "${TMP_LIBRARIES}"
COMPILES
"#include <pcre2posix.h>\nint main() {regex_t r;return pcre2_regcomp(&r, \"\", 0);}"
"WITHOUT_PCRE2_STATIC;PCRE2_STATIC")
IF(NOT WITHOUT_PCRE2_STATIC AND PCRE2_STATIC)
ADD_DEFINITIONS(-DPCRE2_STATIC)
ENDIF(NOT WITHOUT_PCRE2_STATIC AND PCRE2_STATIC)
ENDIF(NOT WITHOUT_PCRE2_STATIC AND PCRE2_STATIC)
ENDIF(NOT WITHOUT_PCRE2_STATIC AND PCRE2_STATIC)
ENDIF(PCRE2POSIX_FOUND)
MARK_AS_ADVANCED(CLEAR PCRE2_INCLUDE_DIR)
MARK_AS_ADVANCED(CLEAR PCRE2POSIX_LIBRARIES)
MARK_AS_ADVANCED(CLEAR PCRE2_LIBRARIES)
MARK_AS_ADVANCED(CLEAR LIBGCC_LIBRARIES)
ENDIF(NOT FOUND_POSIX_REGEX_LIB AND POSIX_REGEX_LIB MATCHES "^(AUTO|LIBPCRE2POSIX)$")
#
# Check functions
#
+20 -7
View File
@@ -289,7 +289,7 @@ endif
# -no-undefined marks that libarchive doesn't rely on symbols
# defined in the application. This is mandatory for cygwin.
libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION) $(GC_SECTIONS)
libarchive_la_LDFLAGS= -no-undefined -version-info $(ARCHIVE_LIBTOOL_VERSION) $(DEAD_CODE_REMOVAL)
libarchive_la_LIBADD= $(LTLIBICONV)
# Manpages to install
@@ -454,6 +454,7 @@ libarchive_test_SOURCES= \
libarchive/test/test_read_filter_program.c \
libarchive/test/test_read_filter_program_signature.c \
libarchive/test/test_read_filter_uudecode.c \
libarchive/test/test_read_filter_uudecode_raw.c \
libarchive/test/test_read_format_7zip.c \
libarchive/test/test_read_format_7zip_encryption_data.c \
libarchive/test/test_read_format_7zip_encryption_partially.c \
@@ -632,13 +633,15 @@ libarchive_test_SOURCES= \
libarchive/test/test_write_format_xar.c \
libarchive/test/test_write_format_xar_empty.c \
libarchive/test/test_write_format_zip.c \
libarchive/test/test_write_format_zip64_stream.c \
libarchive/test/test_write_format_zip_compression_store.c \
libarchive/test/test_write_format_zip_entry_size_unset.c \
libarchive/test/test_write_format_zip_empty.c \
libarchive/test/test_write_format_zip_empty_zip64.c \
libarchive/test/test_write_format_zip_entry_size_unset.c \
libarchive/test/test_write_format_zip_file.c \
libarchive/test/test_write_format_zip_file_zip64.c \
libarchive/test/test_write_format_zip_large.c \
libarchive/test/test_write_format_zip_stream.c \
libarchive/test/test_write_format_zip_zip64.c \
libarchive/test/test_write_open_memory.c \
libarchive/test/test_write_read_format_zip.c \
@@ -689,6 +692,8 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_compat_lz4_B7BD.tar.lz4.uu \
libarchive/test/test_compat_lzip_1.tlz.uu \
libarchive/test/test_compat_lzip_2.tlz.uu \
libarchive/test/test_compat_lzip_3.lz.uu \
libarchive/test/test_compat_lzip_4.tlz.uu \
libarchive/test/test_compat_lzma_1.tlz.uu \
libarchive/test/test_compat_lzma_2.tlz.uu \
libarchive/test/test_compat_lzma_3.tlz.uu \
@@ -748,6 +753,8 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_read_filter_lrzip.tar.lrz.uu \
libarchive/test/test_read_filter_lzop.tar.lzo.uu \
libarchive/test/test_read_filter_lzop_multiple_parts.tar.lzo.uu \
libarchive/test/test_read_filter_uudecode_raw.uu \
libarchive/test/test_read_filter_uudecode_base64_raw.uu \
libarchive/test/test_read_format_mtree_crash747.mtree.bz2.uu \
libarchive/test/test_read_format_mtree_noprint.mtree.uu \
libarchive/test/test_read_format_7zip_bcj2_bzip2.7z.uu \
@@ -790,6 +797,7 @@ libarchive_test_EXTRA_DIST=\
libarchive/test/test_read_format_7zip_ppmd.7z.uu \
libarchive/test/test_read_format_7zip_solid_zstd.7z.uu \
libarchive/test/test_read_format_7zip_symbolic_name.7z.uu \
libarchive/test/test_read_format_7zip_win_attrib.7z.uu \
libarchive/test/test_read_format_7zip_zstd_arm.7z.uu \
libarchive/test/test_read_format_7zip_zstd_bcj.7z.uu \
libarchive/test/test_read_format_7zip_zstd_nobcj.7z.uu \
@@ -1046,7 +1054,7 @@ endif
bsdtar_LDADD= libarchive.la libarchive_fe.la $(LTLIBICONV)
bsdtar_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdtar_ccstatic) $(PLATFORMCPPFLAGS)
bsdtar_LDFLAGS= $(bsdtar_ldstatic) $(GC_SECTIONS)
bsdtar_LDFLAGS= $(bsdtar_ldstatic) $(DEAD_CODE_REMOVAL)
bsdtar_EXTRA_DIST= \
tar/bsdtar.1 \
@@ -1106,6 +1114,7 @@ bsdtar_test_SOURCES= \
tar/test/test_option_exclude_vcs.c \
tar/test/test_option_fflags.c \
tar/test/test_option_gid_gname.c \
tar/test/test_option_group.c \
tar/test/test_option_grzip.c \
tar/test/test_option_ignore_zeros.c \
tar/test/test_option_j.c \
@@ -1119,6 +1128,7 @@ bsdtar_test_SOURCES= \
tar/test/test_option_newer_than.c \
tar/test/test_option_nodump.c \
tar/test/test_option_older_than.c \
tar/test/test_option_owner.c \
tar/test/test_option_passphrase.c \
tar/test/test_option_q.c \
tar/test/test_option_r.c \
@@ -1212,7 +1222,7 @@ endif
bsdcpio_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
bsdcpio_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcpio_ccstatic) $(PLATFORMCPPFLAGS)
bsdcpio_LDFLAGS= $(bsdcpio_ldstatic) $(GC_SECTIONS)
bsdcpio_LDFLAGS= $(bsdcpio_ldstatic) $(DEAD_CODE_REMOVAL)
bsdcpio_EXTRA_DIST= \
cpio/bsdcpio.1 \
@@ -1366,7 +1376,7 @@ endif
bsdcat_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
bsdcat_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdcat_ccstatic) $(PLATFORMCPPFLAGS)
bsdcat_LDFLAGS= $(bsdcat_ldstatic) $(GC_SECTIONS)
bsdcat_LDFLAGS= $(bsdcat_ldstatic) $(DEAD_CODE_REMOVAL)
bsdcat_EXTRA_DIST= \
cat/bsdcat.1 \
@@ -1474,7 +1484,7 @@ endif
bsdunzip_LDADD= libarchive_fe.la libarchive.la $(LTLIBICONV)
bsdunzip_CPPFLAGS= -I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe $(bsdunzip_ccstatic) $(PLATFORMCPPFLAGS)
bsdunzip_LDFLAGS= $(bsdunzip_ldstatic) $(GC_SECTIONS)
bsdunzip_LDFLAGS= $(bsdunzip_ldstatic) $(DEAD_CODE_REMOVAL)
bsdunzip_EXTRA_DIST= \
unzip/bsdunzip.1 \
@@ -1499,6 +1509,7 @@ bsdunzip_test_SOURCES= \
unzip/test/test.h \
unzip/test/test_0.c \
unzip/test/test_basic.c \
unzip/test/test_doubledash.c \
unzip/test/test_glob.c \
unzip/test/test_not_exist.c \
unzip/test/test_singlefile.c \
@@ -1515,7 +1526,8 @@ bsdunzip_test_SOURCES= \
unzip/test/test_version.c \
unzip/test/test_x.c \
unzip/test/test_Z1.c \
unzip/test/test_P_encryption.c
unzip/test/test_P_encryption.c \
unzip/test/test_I.c
bsdunzip_test_CPPFLAGS= \
-I$(top_srcdir)/libarchive -I$(top_srcdir)/libarchive_fe \
@@ -1543,4 +1555,5 @@ bsdunzip_test_EXTRA_DIST= \
unzip/test/test_encrypted.zip.uu \
unzip/test/test_singlefile.zip.uu \
unzip/test/test_t_bad.zip.uu \
unzip/test/test_I.zip.uu \
unzip/test/CMakeLists.txt
+4
View File
@@ -1,3 +1,7 @@
Apr 08, 2024: libarchive 3.7.3 released
Sep 12, 2023: libarchive 3.7.2 released
Jul 29, 2023: libarchive 3.7.1 released
Jul 18, 2023: libarchive 3.7.0 released
+11 -3
View File
@@ -1,8 +1,7 @@
@ECHO OFF
SET ZLIB_VERSION=1.2.13
SET ZLIB_VERSION=1.3
SET BZIP2_VERSION=1ea1ac188ad4b9cb662e3f8314673c63df95a589
SET XZ_VERSION=5.4.4
SET ZSTD_VERSION=1.5.5
IF NOT "%BE%"=="mingw-gcc" (
IF NOT "%BE%"=="msvc" (
ECHO Environment variable BE must be mingw-gcc or msvc
@@ -10,9 +9,18 @@ IF NOT "%BE%"=="mingw-gcc" (
)
)
REM v1.5.6 has a bug with the CMake files & MSVC
REM https://github.com/facebook/zstd/issues/3999
REM Fall back to 1.5.5 for MSVC until fixed
IF "%BE%"=="msvc" (
SET ZSTD_VERSION=1.5.5
) ELSE (
SET ZSTD_VERSION=1.5.6
)
SET ORIGPATH=%PATH%
IF "%BE%"=="mingw-gcc" (
SET MINGWPATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\cmake\bin;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin
SET MINGWPATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\cmake\bin;C:\ProgramData\mingw64\mingw64\bin
)
IF "%1"=="deplibs" (
+34
View File
@@ -0,0 +1,34 @@
# - Find pcre2posix
# Find the native PCRE2-8 and PCRE2-POSIX include and libraries
#
# PCRE2_INCLUDE_DIR - where to find pcre2posix.h, etc.
# PCRE2POSIX_LIBRARIES - List of libraries when using libpcre2-posix.
# PCRE2_LIBRARIES - List of libraries when using libpcre2-8.
# PCRE2POSIX_FOUND - True if libpcre2-posix found.
# PCRE2_FOUND - True if libpcre2-8 found.
IF (PCRE2_INCLUDE_DIR)
# Already in cache, be silent
SET(PCRE2_FIND_QUIETLY TRUE)
ENDIF (PCRE2_INCLUDE_DIR)
FIND_PATH(PCRE2_INCLUDE_DIR pcre2posix.h)
FIND_LIBRARY(PCRE2POSIX_LIBRARY NAMES pcre2-posix libpcre2-posix pcre2-posix-static)
FIND_LIBRARY(PCRE2_LIBRARY NAMES pcre2-8 libpcre2-8 pcre2-8-static)
# handle the QUIETLY and REQUIRED arguments and set PCRE2POSIX_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2POSIX DEFAULT_MSG PCRE2POSIX_LIBRARY PCRE2_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE2 DEFAULT_MSG PCRE2_LIBRARY)
IF(PCRE2POSIX_FOUND)
SET(PCRE2POSIX_LIBRARIES ${PCRE2POSIX_LIBRARY})
SET(HAVE_LIBPCRE2POSIX 1)
SET(HAVE_PCRE2POSIX_H 1)
ENDIF(PCRE2POSIX_FOUND)
IF(PCRE2_FOUND)
SET(PCRE2_LIBRARIES ${PCRE2_LIBRARY})
SET(HAVE_LIBPCRE2 1)
ENDIF(PCRE2_FOUND)
+11 -3
View File
@@ -753,6 +753,12 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `pcreposix' library (-lpcreposix). */
#cmakedefine HAVE_LIBPCREPOSIX 1
/* Define to 1 if you have the `pcre2-8' library (-lpcre2-8). */
#cmakedefine HAVE_LIBPCRE2 1
/* Define to 1 if you have the `pcreposix' library (-lpcre2posix). */
#cmakedefine HAVE_LIBPCRE2POSIX 1
/* Define to 1 if you have the `xml2' library (-lxml2). */
#cmakedefine HAVE_LIBXML2 1
@@ -768,9 +774,8 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the `zstd' library (-lzstd). */
#cmakedefine HAVE_LIBZSTD 1
/* Define to 1 if you have the `zstd' library (-lzstd) with compression
support. */
#cmakedefine HAVE_LIBZSTD_COMPRESSOR 1
/* Define to 1 if you have the ZSTD_compressStream function. */
#cmakedefine HAVE_ZSTD_compressStream 1
/* Define to 1 if you have the <limits.h> header file. */
#cmakedefine HAVE_LIMITS_H 1
@@ -926,6 +931,9 @@ typedef uint64_t uintmax_t;
/* Define to 1 if you have the <pcreposix.h> header file. */
#cmakedefine HAVE_PCREPOSIX_H 1
/* Define to 1 if you have the <pcre2posix.h> header file. */
#cmakedefine HAVE_PCRE2POSIX_H 1
/* Define to 1 if you have the `pipe' function. */
#cmakedefine HAVE_PIPE 1
@@ -39,9 +39,6 @@ cat > ${outfile} <<CR_END
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* \$FreeBSD\$
*
*/
/*
+1 -1
View File
@@ -1 +1 @@
3007002
3007003
-2
View File
@@ -22,8 +22,6 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd March 1, 2014
.Dt BSDCAT 1
.Os
+21 -15
View File
@@ -24,7 +24,6 @@
*/
#include "bsdcat_platform.h"
__FBSDID("$FreeBSD$");
#include <stdio.h>
#ifdef HAVE_STDLIB_H
@@ -37,6 +36,9 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#endif
#include <archive.h>
#include <archive_entry.h>
#include "bsdcat.h"
#include "err.h"
@@ -48,7 +50,7 @@ static const char *bsdcat_current_path;
static int exit_status = 0;
void
static __LA_NORETURN void
usage(FILE *stream, int eval)
{
const char *p;
@@ -58,7 +60,7 @@ usage(FILE *stream, int eval)
exit(eval);
}
static void
static __LA_NORETURN void
version(void)
{
printf("bsdcat %s - %s \n",
@@ -67,7 +69,15 @@ version(void)
exit(0);
}
void
static void
bsdcat_print_error(void)
{
lafe_warnc(0, "%s: %s",
bsdcat_current_path, archive_error_string(a));
exit_status = 1;
}
static void
bsdcat_next(void)
{
if (a != NULL) {
@@ -82,15 +92,7 @@ bsdcat_next(void)
archive_read_support_format_raw(a);
}
void
bsdcat_print_error(void)
{
lafe_warnc(0, "%s: %s",
bsdcat_current_path, archive_error_string(a));
exit_status = 1;
}
void
static void
bsdcat_read_to_stdout(const char* filename)
{
int r;
@@ -130,12 +132,16 @@ main(int argc, char **argv)
switch (c) {
case 'h':
usage(stdout, 0);
break;
/* NOTREACHED */
/* Fallthrough */
case OPTION_VERSION:
version();
break;
/* NOTREACHED */
/* Fallthrough */
default:
usage(stderr, 1);
/* Fallthrough */
/* NOTREACHED */
}
}
-7
View File
@@ -34,9 +34,6 @@
#include "config.h"
#endif
#include <archive.h>
#include <archive_entry.h>
struct bsdcat {
/* Option parser state */
int getopt_state;
@@ -53,9 +50,5 @@ enum {
};
int bsdcat_getopt(struct bsdcat *);
void usage(FILE *stream, int eval);
void bsdcat_next(void);
void bsdcat_print_error(void);
void bsdcat_read_to_stdout(const char* filename);
#endif
+7 -17
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/tar/bsdtar_platform.h,v 1.26 2008/12/06 07:37:14 kientzle Exp $
*/
/*
@@ -42,16 +40,6 @@
#include "config.h"
#endif
/* Get a real definition for __FBSDID if we can */
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
/* If not, define it so as to avoid dangling semicolons. */
#ifndef __FBSDID
#define __FBSDID(a) struct _undefined_hack
#endif
#ifdef HAVE_LIBARCHIVE
/* If we're using the platform libarchive, include system headers. */
#include <archive.h>
@@ -64,12 +52,14 @@
/* How to mark functions that don't return. */
/* This facilitates use of some newer static code analysis tools. */
#undef __LA_DEAD
#undef __LA_NORETURN
#if defined(__GNUC__) && (__GNUC__ > 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define __LA_DEAD __attribute__((__noreturn__))
#else
#define __LA_DEAD
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define __LA_NORETURN __attribute__((__noreturn__))
#elif defined(_MSC_VER)
#define __LA_NORETURN __declspec(noreturn)
#else
#define __LA_NORETURN
#endif
#endif /* !BSDCAT_PLATFORM_H_INCLUDED */
-1
View File
@@ -28,7 +28,6 @@
*/
#include "bsdcat_platform.h"
__FBSDID("$FreeBSD$");
#ifdef HAVE_ERRNO_H
#include <errno.h>
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
/* Every test program should #include "test.h" as the first thing. */
+57 -9
View File
@@ -4,8 +4,8 @@ dnl First, define all of the version numbers up front.
dnl In particular, this allows the version macro to be used in AC_INIT
dnl These first two version numbers are updated automatically on each release.
m4_define([LIBARCHIVE_VERSION_S],[3.7.2dev])
m4_define([LIBARCHIVE_VERSION_N],[3007002])
m4_define([LIBARCHIVE_VERSION_S],[3.7.3])
m4_define([LIBARCHIVE_VERSION_N],[3007003])
dnl bsdtar and bsdcpio versioning tracks libarchive
m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@@ -461,7 +461,7 @@ if test "x$with_zstd" != "xno"; then
AC_CHECK_HEADERS([zstd.h])
AC_CHECK_LIB(zstd,ZSTD_decompressStream)
AC_CHECK_LIB(zstd,ZSTD_compressStream,
AC_DEFINE([HAVE_LIBZSTD_COMPRESSOR], [1], [Define to 1 if you have the `zstd' library (-lzstd) with compression support.]))
AC_DEFINE([HAVE_ZSTD_compressStream], [1], [Define to 1 if you have the `zstd' library (-lzstd) with compression support.]))
fi
AC_ARG_WITH([lzma],
@@ -482,7 +482,7 @@ if test "x$with_lzma" != "xno"; then
[#if LZMA_VERSION < 50020000]
[#error unsupported]
[#endif]],
[[lzma_stream_encoder_mt(0, 0);]])],
[[int ignored __attribute__((unused)); ignored = lzma_stream_encoder_mt(0, 0);]])],
[ac_cv_lzma_has_mt=yes], [ac_cv_lzma_has_mt=no])])
if test "x$ac_cv_lzma_has_mt" != xno; then
AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.])
@@ -552,6 +552,7 @@ AC_ARG_ENABLE([posix-regex-lib],
AS_HELP_STRING([--enable-posix-regex-lib=libc], [use libc POSIX regular expression support])
AS_HELP_STRING([--enable-posix-regex-lib=libregex], [use libregex POSIX regular expression support])
AS_HELP_STRING([--enable-posix-regex-lib=libpcreposix], [use libpcreposix POSIX regular expression support])
AS_HELP_STRING([--enable-posix-regex-lib=libpcre2posix], [use libpcre2-posix POSIX regular expression support])
AS_HELP_STRING([--disable-posix-regex-lib], [don't enable POSIX regular expression support])],
[], [enable_posix_regex_lib=auto])
@@ -603,6 +604,39 @@ if test -z $posix_regex_lib_found && (test "$enable_posix_regex_lib" = "auto" ||
posix_regex_lib_found=1
fi
fi
if test -z $posix_regex_lib_found && (test "$enable_posix_regex_lib" = "auto" || test "$enable_posix_regex_lib" = "libpcre2posix"); then
AC_CHECK_HEADERS([pcre2posix.h])
AC_CHECK_LIB(pcre2-posix,regcomp)
if test "x$ac_cv_lib_pcre2posix_regcomp" != xyes; then
AC_MSG_NOTICE(trying libpcre2posix check again with libpcre2-8)
unset ac_cv_lib_pcre2posix_regcomp
AC_CHECK_LIB(pcre2,pcre2_regexec)
AC_CHECK_LIB(pcre2-posix,pcre2_regcomp)
if test "x$ac_cv_lib_pcre2_pcre_exec" = xyes && test "x$ac_cv_lib_pcre2posix_regcomp" = xyes; then
AC_MSG_CHECKING(if PCRE2_STATIC needs to be defined)
AC_LINK_IFELSE(
[AC_LANG_SOURCE(#include <pcre2posix.h>
int main() { return pcre2_regcomp(NULL, NULL, 0); })],
[without_pcre2_static=yes],
[without_pcre2_static=no])
AC_LINK_IFELSE(
[AC_LANG_SOURCE(#define PCRE2_STATIC
#include <pcre2posix.h>
int main() { return pcre2_regcomp(NULL, NULL, 0); })],
[with_pcre2_static=yes],
[with_pcre2_static=no])
if test "x$without_pcre2_static" != xyes && test "x$with_pcre2_static" = xyes; then
AC_MSG_RESULT(yes)
AC_DEFINE([PCRE2_STATIC], [1], [Define to 1 if PCRE2_STATIC needs to be defined.])
elif test "x$without_pcre2_static" = xyes || test "x$with_pcre2_static" = xyes; then
AC_MSG_RESULT(no)
fi
posix_regex_lib_found=1
fi
else
posix_regex_lib_found=1
fi
fi
# TODO: Give the user the option of using a pre-existing system
# libarchive. This will define HAVE_LIBARCHIVE which will cause
@@ -614,21 +648,35 @@ fi
# Checks for supported compiler flags
AX_APPEND_COMPILE_FLAGS([-Wall -Wformat -Wformat-security])
# Place the functions and data into separate sections, allowing the linker
# to garbage collect the unused ones.
# Place the functions and data into separate sections, allowing GNU style
# linkers to garbage collect the unused ones.
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--gc-sections"
AC_MSG_CHECKING([whether ld supports --gc-sections])
AC_LINK_IFELSE(
[AC_LANG_SOURCE([static char UnusedFunc() { return 5; } int main() { return 0;}])],
[AC_MSG_RESULT([yes])
GC_SECTIONS="-Wl,--gc-sections";
DEAD_CODE_REMOVAL="-Wl,--gc-sections";
AX_APPEND_COMPILE_FLAGS([-ffunction-sections -fdata-sections])],
[AC_MSG_RESULT([no])
GC_SECTIONS="";])
DEAD_CODE_REMOVAL="";])
LDFLAGS=$save_LDFLAGS
AC_SUBST(GC_SECTIONS)
if test "$DEAD_CODE_REMOVAL" == ""; then
# Macos linkers have a -dead_strip flag, which is similar to --gc-sections.
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-dead_strip"
AC_MSG_CHECKING([whether ld supports -dead_strip])
AC_LINK_IFELSE(
[AC_LANG_SOURCE([static char UnusedFunc() { return 5; } int main() { return 0;}])],
[AC_MSG_RESULT([yes])
DEAD_CODE_REMOVAL="-Wl,-dead_strip";],
[AC_MSG_RESULT([no])
DEAD_CODE_REMOVAL="";])
LDFLAGS=$save_LDFLAGS
fi
AC_SUBST(DEAD_CODE_REMOVAL)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
+9
View File
@@ -442,6 +442,12 @@
/* Define to 1 if you have the `pcreposix' library (-lpcreposix). */
/* #undef HAVE_LIBPCREPOSIX */
/* Define to 1 if you have the `pcre2-8' library (-lpcre2-8). */
/* #undef HAVE_LIBPCRE2 */
/* Define to 1 if you have the `pcre2-posix' library (-lpcre2-posix). */
/* #undef HAVE_LIBPCRE2POSIX */
/* Define to 1 if you have the `regex' library (-lregex). */
/* #undef HAVE_LIBREGEX */
@@ -593,6 +599,9 @@
/* Define to 1 if you have the <pcreposix.h> header file. */
/* #undef HAVE_PCREPOSIX_H */
/* Define to 1 if you have the <pcre2posix.h> header file. */
/* #undef HAVE_PCRE2POSIX_H */
/* Define to 1 if you have the `pipe' function. */
/* #undef HAVE_PIPE */
+14 -3
View File
@@ -83,6 +83,7 @@ static void printhelp()
" -f filename Filename to verify\n"
" -h Show this help\n"
" -q Quiet mode\n"
" -r Enforce raw archive format\n"
" -s Verify only headers (skip data)\n\n"
"If no filename is specified, data is read from standard input.\n"
"\n%s\n", archive_version_details());
@@ -110,15 +111,17 @@ int main(int argc, char *argv[])
const char *p;
char buffer[4096];
int c;
int v, skip_data;
int v, skip_data, raw;
int r = ARCHIVE_OK;
int format_printed;
mode_t mode;
filename = NULL;
skip_data = 0;
raw = 0;
v = 1;
while ((c = getopt (argc, argv, "f:hqs")) != -1) {
while ((c = getopt (argc, argv, "f:hrqs")) != -1) {
switch (c) {
case 'f':
filename = optarg;
@@ -129,6 +132,9 @@ int main(int argc, char *argv[])
case 'q':
v = 0;
break;
case 'r':
raw = 1;
break;
case 's':
skip_data = 1;
break;
@@ -153,7 +159,10 @@ int main(int argc, char *argv[])
a = archive_read_new();
archive_read_support_filter_all(a);
archive_read_support_format_all(a);
if (raw)
archive_read_support_format_raw(a);
else
archive_read_support_format_all(a);
v_print(v, "Data source: ");
@@ -191,11 +200,13 @@ int main(int argc, char *argv[])
if (r == ARCHIVE_EOF)
break;
p = archive_entry_pathname(entry);
mode = archive_entry_mode(entry);
v_print(v, "Entry %d: %s, pathname", c, errnostr(r));
if (p == NULL || p[0] == '\0')
v_print(v, " unreadable");
else
v_print(v, ": %s", p);
v_print(v, ", mode: %o", mode);
v_print(v, ", data: ");
if (skip_data) {
v_print(v, "skipping");
-2
View File
@@ -1,5 +1,3 @@
# $FreeBSD$
PROG= shar
SRCS= shar.c tree.c
-1
View File
@@ -30,7 +30,6 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)shar.1 8.1 (Berkeley) 6/6/93
.\" $FreeBSD$
.\"
.Dd April 17, 2008
.Dt SHAR 1
-5
View File
@@ -24,11 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#ifdef __FBSDID
__FBSDID("$FreeBSD$");
#endif
#include <sys/stat.h>
#include <sys/types.h>
-1
View File
@@ -43,7 +43,6 @@
* regular dir or via fchdir(2) for a symlink).
*/
#include "tree_config.h"
__FBSDID("$FreeBSD$");
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
/*-
-10
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef TREE_CONFIG_H_INCLUDED
#define TREE_CONFIG_H_INCLUDED
@@ -57,14 +55,6 @@
#error Oops: No config.h and no built-in configuration in bsdtar_platform.h.
#endif /* !HAVE_CONFIG_H */
/* No non-FreeBSD platform will have __FBSDID, so just define it here. */
#ifdef __FreeBSD__
#include <sys/cdefs.h> /* For __FBSDID */
#else
/* Just leaving this macro replacement empty leads to a dangling semicolon. */
#define __FBSDID(a) struct _undefined_hack
#endif
#ifdef HAVE_LIBARCHIVE
/* If we're using the platform libarchive, include system headers. */
#include <archive.h>
+59 -63
View File
@@ -37,22 +37,28 @@
#include <sys/stat.h> /* For mkdir() */
#if defined(_WIN32) && !defined(__CYGWIN__)
#define NUM_FORMAT "zu"
#include <direct.h>
#elif defined(__linux__) || defined(linux) || defined(__linux)
#define NUM_FORMAT "d"
#else
#define NUM_FORMAT "lu"
#endif /* defined(_WIN32) && !defined(__CYGWIN__) */
#include <windows.h>
#endif
#define TO_STRING(x) #x
#define STR(x) TO_STRING(x)
#define BLOCKSIZE 512
/* System call to create a directory. */
static int
system_mkdir(char *pathname, int mode)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
(void)mode; /* UNUSED */
return _mkdir(pathname);
#else
return mkdir(pathname, mode);
#endif
}
/* Parse an octal number, ignoring leading and trailing nonsense. */
static int
static unsigned long
parseoct(const char *p, size_t n)
{
int i = 0;
unsigned long i = 0;
while ((*p < '0' || *p > '7') && n > 0) {
++p;
@@ -72,7 +78,7 @@ static int
is_end_of_archive(const char *p)
{
int n;
for (n = 511; n >= 0; --n)
for (n = 0; n < BLOCKSIZE; ++n)
if (p[n] != '\0')
return (0);
return (1);
@@ -90,12 +96,7 @@ create_dir(char *pathname, int mode)
pathname[strlen(pathname) - 1] = '\0';
/* Try creating the directory. */
#if defined(_WIN32) && !defined(__CYGWIN__)
r = _mkdir(pathname);
#else
r = mkdir(pathname, mode);
#endif
r = system_mkdir(pathname, mode);
if (r != 0) {
/* On failure, try creating parent directory. */
p = strrchr(pathname, '/');
@@ -103,11 +104,7 @@ create_dir(char *pathname, int mode)
*p = '\0';
create_dir(pathname, 0755);
*p = '/';
#if defined(_WIN32) && !defined(__CYGWIN__)
r = _mkdir(pathname);
#else
r = mkdir(pathname, mode);
#endif
r = system_mkdir(pathname, mode);
}
}
if (r != 0)
@@ -138,7 +135,7 @@ static int
verify_checksum(const char *p)
{
int n, u = 0;
for (n = 0; n < 512; ++n) {
for (n = 0; n < BLOCKSIZE; ++n) {
if (n < 148 || n > 155)
/* Standard tar checksum adds unsigned bytes. */
u += ((unsigned char *)p)[n];
@@ -146,26 +143,25 @@ verify_checksum(const char *p)
u += 0x20;
}
return (u == parseoct(p + 148, 8));
return (u == (int)parseoct(p + 148, 8));
}
/* Extract a tar archive. */
static void
untar(FILE *a, const char *path)
{
enum { BUF_SIZE=512 };
char buff[BUF_SIZE];
char buff[BLOCKSIZE];
FILE *f = NULL;
size_t bytes_read;
off_t filesize;
unsigned long filesize;
printf("Extracting from %s\n", path);
for (;;) {
bytes_read = fread(buff, 1, BUF_SIZE, a);
if (bytes_read < BUF_SIZE) {
bytes_read = fread(buff, 1, BLOCKSIZE, a);
if (bytes_read < BLOCKSIZE) {
fprintf(stderr,
"Short read on %s: expected " STR(BUF_SIZE) ", got %"NUM_FORMAT"\n",
path, bytes_read);
"Short read on %s: expected %d, got %d\n",
path, BLOCKSIZE, (int)bytes_read);
return;
}
if (is_end_of_archive(buff)) {
@@ -178,51 +174,51 @@ untar(FILE *a, const char *path)
}
filesize = parseoct(buff + 124, 12);
switch (buff[156]) {
case '1':
printf(" Ignoring hardlink %s\n", buff);
break;
case '2':
printf(" Ignoring symlink %s\n", buff);
break;
case '3':
printf(" Ignoring character device %s\n", buff);
break;
case '4':
printf(" Ignoring block device %s\n", buff);
break;
case '5':
printf(" Extracting dir %s\n", buff);
create_dir(buff, parseoct(buff + 100, 8));
filesize = 0;
break;
case '6':
printf(" Ignoring FIFO %s\n", buff);
break;
default:
printf(" Extracting file %s\n", buff);
f = create_file(buff, parseoct(buff + 100, 8));
case '1':
printf(" Ignoring hardlink %s\n", buff);
break;
case '2':
printf(" Ignoring symlink %s\n", buff);
break;
case '3':
printf(" Ignoring character device %s\n", buff);
break;
case '4':
printf(" Ignoring block device %s\n", buff);
break;
case '5':
printf(" Extracting dir %s\n", buff);
create_dir(buff, (int)parseoct(buff + 100, 8));
filesize = 0;
break;
case '6':
printf(" Ignoring FIFO %s\n", buff);
break;
default:
printf(" Extracting file %s\n", buff);
f = create_file(buff, (int)parseoct(buff + 100, 8));
break;
}
while (filesize > 0) {
bytes_read = fread(buff, 1, BUF_SIZE, a);
if (bytes_read < BUF_SIZE) {
bytes_read = fread(buff, 1, BLOCKSIZE, a);
if (bytes_read < BLOCKSIZE) {
fprintf(stderr,
"Short read on %s: Expected " STR(BUF_SIZE) ", got %"NUM_FORMAT"\n",
path, bytes_read);
"Short read on %s: Expected %d, got %d\n",
path, BLOCKSIZE, (int)bytes_read);
return;
}
if (filesize < BUF_SIZE)
bytes_read = filesize;
if (filesize < BLOCKSIZE)
bytes_read = (size_t)filesize;
if (f != NULL) {
if (fwrite(buff, 1, bytes_read, f)
!= bytes_read)
!= bytes_read)
{
fprintf(stderr, "Failed write\n");
fclose(f);
f = NULL;
}
}
filesize -= (off_t)bytes_read;
filesize -= bytes_read;
}
if (f != NULL) {
fclose(f);
-2
View File
@@ -22,8 +22,6 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd September 16, 2014
.Dt CPIO 1
.Os
-1
View File
@@ -26,7 +26,6 @@
#include "cpio_platform.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/cmdline.c,v 1.5 2008/12/06 07:30:40 kientzle Exp $");
#ifdef HAVE_ERRNO_H
#include <errno.h>
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/cpio/config_freebsd.h,v 1.3 2008/12/06 07:30:40 kientzle Exp $
*/
/* A hand-tooled configuration for FreeBSD. */
+8 -9
View File
@@ -26,7 +26,6 @@
#include "cpio_platform.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/cpio.c,v 1.15 2008/12/06 07:30:40 kientzle Exp $");
#include <sys/types.h>
#include <archive.h>
@@ -108,22 +107,22 @@ static int entry_to_archive(struct cpio *, struct archive_entry *);
static int file_to_archive(struct cpio *, const char *);
static void free_cache(struct name_cache *cache);
static void list_item_verbose(struct cpio *, struct archive_entry *);
static void long_help(void) __LA_DEAD;
static __LA_NORETURN void long_help(void);
static const char *lookup_gname(struct cpio *, gid_t gid);
static int lookup_gname_helper(struct cpio *,
const char **name, id_t gid);
static const char *lookup_uname(struct cpio *, uid_t uid);
static int lookup_uname_helper(struct cpio *,
const char **name, id_t uid);
static void mode_in(struct cpio *) __LA_DEAD;
static void mode_list(struct cpio *) __LA_DEAD;
static __LA_NORETURN void mode_in(struct cpio *);
static __LA_NORETURN void mode_list(struct cpio *);
static void mode_out(struct cpio *);
static void mode_pass(struct cpio *, const char *);
static const char *remove_leading_slash(const char *);
static int restore_time(struct cpio *, struct archive_entry *,
const char *, int fd);
static void usage(void) __LA_DEAD;
static void version(void) __LA_DEAD;
static __LA_NORETURN void usage(void);
static __LA_NORETURN void version(void);
static const char * passphrase_callback(struct archive *, void *);
static void passphrase_free(char *);
@@ -251,7 +250,7 @@ main(int argc, char *argv[])
break;
case 'h':
long_help();
break;
/* NOTREACHED */
case 'I': /* NetBSD/OpenBSD */
cpio->filename = cpio->argument;
break;
@@ -358,7 +357,7 @@ main(int argc, char *argv[])
break;
case OPTION_VERSION: /* GNU convention */
version();
break;
/* NOTREACHED */
#if 0
/*
* cpio_getopt() handles -W specially, so it's not
@@ -427,7 +426,7 @@ main(int argc, char *argv[])
mode_list(cpio);
else
mode_in(cpio);
break;
/* NOTREACHED */
case 'p':
if (*cpio->argv == NULL || **cpio->argv == '\0')
lafe_errc(1, 0,
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/cpio/cpio.h,v 1.7 2008/12/06 07:30:40 kientzle Exp $
*/
#ifndef CPIO_H_INCLUDED
+4 -14
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/usr.bin/cpio/cpio_platform.h,v 1.2 2008/12/06 07:15:42 kientzle Exp $
*/
/*
@@ -46,16 +44,6 @@
#include "cpio_windows.h"
#endif
/* Get a real definition for __FBSDID if we can */
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
/* If not, define it so as to avoid dangling semicolons. */
#ifndef __FBSDID
#define __FBSDID(a) struct _undefined_hack
#endif
#ifdef HAVE_LIBARCHIVE
/* If we're using the platform libarchive, include system headers. */
#include <archive.h>
@@ -69,9 +57,11 @@
/* How to mark functions that don't return. */
#if defined(__GNUC__) && (__GNUC__ > 2 || \
(__GNUC__ == 2 && __GNUC_MINOR__ >= 5))
#define __LA_DEAD __attribute__((__noreturn__))
#define __LA_NORETURN __attribute__((__noreturn__))
#elif defined(_MSC_VER)
#define __LA_NORETURN __declspec(noreturn)
#else
#define __LA_DEAD
#define __LA_NORETURN
#endif
#endif /* !CPIO_PLATFORM_H_INCLUDED */
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef CPIO_WINDOWS_H
#define CPIO_WINDOWS_H 1
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
/* Every test program should #include "test.h" as the first thing. */
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
/*
* This first test does basic sanity checks on the environment. For
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_basic.c,v 1.4 2008/08/25 06:39:29 kientzle Exp $");
static void
verify_files(const char *msg)
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
/*
* Test the command-line parsing.
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_Z)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_bz2)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_grz)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_gz)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_lrz)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_lz)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_lz4)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_lzma)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_lzo)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_xz)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_extract_cpio_zstd)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_format_newc.c,v 1.2 2008/08/22 02:09:10 kientzle Exp $");
/* Number of bytes needed to pad 'n' to multiple of 'block', assuming
* that 'block' is a power of two. This trick can be more easily
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_gcpio_compat.c,v 1.2 2008/08/22 02:27:06 kientzle Exp $");
static void
unpack_test(const char *from, const char *options, const char *se)
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_gcpio_compat_ref.bin
MQW%9`*IWI('H`^@#`@````U'=YD%````"@!F:6QE```Q,C,T-38W.#D*QW%9
M`*IWI('H`^@#`@````U'=YD)````"@!L:6YK9FEL90``,3(S-#4V-S@Y"L=Q
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_gcpio_compat_ref.crc
M,#<P-S`R,#`S,S<W86$P,#`P.#%A-#`P,#`P,V4X,#`P,#`S93@P,#`P,#`P
M,C0W,&0Y.3<W,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4Y,#`P,#`P,#`P,#`P
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_gcpio_compat_ref.newc
M,#<P-S`Q,#`S,S<W86$P,#`P.#%A-#`P,#`P,V4X,#`P,#`S93@P,#`P,#`P
M,C0W,&0Y.3<W,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#4Y,#`P,#`P,#`P,#`P
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_gcpio_compat_ref.ustar
M9FEL90``````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_missing_file)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_0)
{
-2
View File
@@ -23,8 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_B_upper)
{
-2
View File
@@ -23,8 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_C_upper)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_J_upper)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_L.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $");
/* This is a little pointless, as Windows doesn't support symlinks
* (except for the seriously crippled CreateSymbolicLink API) so these
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_Z_upper)
{
-1
View File
@@ -28,7 +28,6 @@
#elif defined(HAVE_SYS_UTIME_H)
#include <sys/utime.h>
#endif
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_a.c,v 1.3 2008/08/24 06:21:00 kientzle Exp $");
static struct {
const char *name;
-1
View File
@@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_b64encode)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
static int
is_octal(const char *p, size_t l)
-2
View File
@@ -23,8 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_d)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
/*
* Unpack the archive in a new dir.
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_option_f.cpio
M,#<P-S`W,#`P,3,Q-C(Q-38Q,3`P-C0T,#`Q-S4P,#`Q-S4P,#`P,#`Q,#`P
M,#`P,3`W,S4Q,3(U,C8P,#`P,#4P,#`P,#`P,#`P,&$Q,C,`,#<P-S`W,#`P
-1
View File
@@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_grzip)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
/*
* Test that "--help", "-h", and "-W help" options all work and
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_l)
{
-1
View File
@@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_lrzip)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_lz4)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_lzma)
{
-1
View File
@@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_lzop)
{
-2
View File
@@ -23,8 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_m)
{
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_option_m.cpio
M,#<P-S`W,#`P,3,Q-#4P,#8T,3`P-C0T,#`Q-S4P,#`Q-S4P,#`P,#`Q,#`P
M,#`P,#`P,#`P,#`P,#$P,#`P,#4P,#`P,#`P,#`P,&9I;&4`,#<P-S`W,#`P
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_passphrase)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
#ifdef HAVE_LOCALE_H
#include <locale.h>
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_option_t.cpio
M,#<P-S`W,#`P,3,Q-#4P,#8T,3`P-C0T,#`Q-S4P,#`Q-S4P,#`P,#`Q,#`P
M,#`P,#`P,#`P,#`P,#$P,#`P,#4P,#`P,#`P,#`P,&9I;&4`,#<P-S`W,#`P
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD$
begin 644 test_option_t.stdout
%9FEL90H`
`
-1
View File
@@ -1,4 +1,3 @@
$FreeBSD: src/usr.bin/cpio/test/test_option_tv.stdout.uu,v 1.2 2008/11/29 20:22:02 kientzle Exp $
begin 644 test_option_tv.stdout
M+7)W+7(M+7(M+2`@(#$@=&EM("`@("`@=&EM("`@("`@("`@("`@(#`@1&5C
/(#,Q("`Q.38Y(&9I;&4*
-1
View File
@@ -28,7 +28,6 @@
#elif defined(HAVE_SYS_UTIME_H)
#include <sys/utime.h>
#endif
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_u)
{
-1
View File
@@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_uuencode)
{
-1
View File
@@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_xz)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_option_y.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $");
DEFINE_TEST(test_option_y)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_z)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
DEFINE_TEST(test_option_zstd)
{
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD$");
#include "../cpio.h"
#include "err.h"
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_passthrough_dotdot.c,v 1.4 2008/08/24 06:21:00 kientzle Exp $");
/*
* Verify that "cpio -p .." works.
-1
View File
@@ -23,7 +23,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test.h"
__FBSDID("$FreeBSD: src/usr.bin/cpio/test/test_passthrough_reverse.c,v 1.2 2008/08/24 06:21:00 kientzle Exp $");
/*
* As reported by Bernd Walter: Some people are in the habit of
+1
View File
@@ -252,6 +252,7 @@ ENDIF(BUILD_SHARED_LIBS)
# archive_static is a static library
ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS})
TARGET_INCLUDE_DIRECTORIES(archive_static PUBLIC .)
TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS})
SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS
LIBARCHIVE_STATIC)
+6 -4
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/lib/libarchive/archive.h.in,v 1.50 2008/05/26 17:00:22 kientzle Exp $
*/
#ifndef ARCHIVE_H_INCLUDED
@@ -36,7 +34,7 @@
* assert that ARCHIVE_VERSION_NUMBER >= 2012108.
*/
/* Note: Compiler will complain if this does not match archive_entry.h! */
#define ARCHIVE_VERSION_NUMBER 3007002
#define ARCHIVE_VERSION_NUMBER 3007003
#include <sys/stat.h>
#include <stddef.h> /* for wchar_t */
@@ -157,7 +155,7 @@ __LA_DECL int archive_version_number(void);
/*
* Textual name/version of the library, useful for version displays.
*/
#define ARCHIVE_VERSION_ONLY_STRING "3.7.2dev"
#define ARCHIVE_VERSION_ONLY_STRING "3.7.3"
#define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
__LA_DECL const char * archive_version_string(void);
@@ -535,6 +533,10 @@ __LA_DECL int archive_read_open_filenames(struct archive *,
const char **_filenames, size_t _block_size);
__LA_DECL int archive_read_open_filename_w(struct archive *,
const wchar_t *_filename, size_t _block_size);
#if defined(_WIN32) && !defined(__CYGWIN__)
__LA_DECL int archive_read_open_filenames_w(struct archive *,
const wchar_t **_filenames, size_t _block_size);
#endif
/* archive_read_open_file() is a deprecated synonym for ..._open_filename(). */
__LA_DECL int archive_read_open_file(struct archive *,
const char *_filename, size_t _block_size) __LA_DEPRECATED;
-1
View File
@@ -25,7 +25,6 @@
*/
#include "archive_platform.h"
__FBSDID("$FreeBSD$");
#ifdef HAVE_ERRNO_H
#include <errno.h>
-2
View File
@@ -21,8 +21,6 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef ARCHIVE_ACL_PRIVATE_H_INCLUDED

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