pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/archivers/libarchive



Module Name:    pkgsrc
Committed By:   adam
Date:           Wed May 21 15:25:52 UTC 2025

Modified Files:
        pkgsrc/archivers/libarchive: Makefile.common
        pkgsrc/archivers/libarchive/files: CMakeLists.txt COPYING Makefile.am
            Makefile.in NEWS README.md config.h.in configure configure.ac
        pkgsrc/archivers/libarchive/files/build: autogen.sh bump-version.sh
            clean.sh version
        pkgsrc/archivers/libarchive/files/build/cmake: config.h.in
        pkgsrc/archivers/libarchive/files/contrib: libarchive.spec
        pkgsrc/archivers/libarchive/files/contrib/android: Android.mk
        pkgsrc/archivers/libarchive/files/contrib/psota-benchmark: tcp.sh
        pkgsrc/archivers/libarchive/files/cpio: CMakeLists.txt
        pkgsrc/archivers/libarchive/files/doc: update.sh
        pkgsrc/archivers/libarchive/files/doc/html: 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 bsdcpio.1.html bsdtar.1.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
        pkgsrc/archivers/libarchive/files/doc/man: archive_read_format.3
            archive_write_set_options.3 bsdtar.1 libarchive-formats.5
        pkgsrc/archivers/libarchive/files/doc/pdf: archive_entry.3.pdf
            archive_entry_acl.3.pdf archive_entry_linkify.3.pdf
            archive_entry_misc.3.pdf archive_entry_paths.3.pdf
            archive_entry_perms.3.pdf archive_entry_stat.3.pdf
            archive_entry_time.3.pdf archive_read.3.pdf
            archive_read_add_passphrase.3.pdf archive_read_data.3.pdf
            archive_read_disk.3.pdf archive_read_extract.3.pdf
            archive_read_filter.3.pdf archive_read_format.3.pdf
            archive_read_free.3.pdf archive_read_header.3.pdf
            archive_read_new.3.pdf archive_read_open.3.pdf
            archive_read_set_options.3.pdf archive_util.3.pdf
            archive_write.3.pdf archive_write_blocksize.3.pdf
            archive_write_data.3.pdf archive_write_disk.3.pdf
            archive_write_filter.3.pdf archive_write_finish_entry.3.pdf
            archive_write_format.3.pdf archive_write_free.3.pdf
            archive_write_header.3.pdf archive_write_new.3.pdf
            archive_write_open.3.pdf archive_write_set_options.3.pdf
            archive_write_set_passphrase.3.pdf bsdcpio.1.pdf bsdtar.1.pdf
            cpio.5.pdf libarchive-formats.5.pdf libarchive.3.pdf
            libarchive_changes.3.pdf libarchive_internals.3.pdf mtree.5.pdf
            tar.5.pdf
        pkgsrc/archivers/libarchive/files/doc/text: archive_read_format.3.txt
            archive_write_set_options.3.txt bsdtar.1.txt
            libarchive-formats.5.txt
        pkgsrc/archivers/libarchive/files/doc/wiki:
            ManPageArchiveReadFormat3.wiki ManPageArchiveWriteSetOptions3.wiki
            ManPageBsdtar1.wiki ManPageLibarchiveFormats5.wiki
        pkgsrc/archivers/libarchive/files/libarchive: CMakeLists.txt archive.h
            archive_acl.c archive_acl_private.h archive_cmdline.c
            archive_cryptor_private.h archive_digest.c archive_digest_private.h
            archive_disk_acl_freebsd.c archive_entry.c archive_entry.h
            archive_entry_copy_bhfi.c archive_entry_link_resolver.c
            archive_entry_locale.h archive_entry_private.h
            archive_hmac_private.h archive_match.c archive_options.c
            archive_options_private.h archive_pack_dev.h archive_platform_acl.h
            archive_platform_xattr.h archive_random_private.h archive_rb.h
            archive_read.c archive_read_disk_posix.c
            archive_read_disk_private.h archive_read_disk_windows.c
            archive_read_format.3 archive_read_open_fd.c
            archive_read_open_file.c archive_read_open_filename.c
            archive_read_support_format_7zip.c
            archive_read_support_format_cpio.c
            archive_read_support_format_iso9660.c
            archive_read_support_format_lha.c archive_read_support_format_rar.c
            archive_read_support_format_rar5.c
            archive_read_support_format_tar.c
            archive_read_support_format_warc.c
            archive_read_support_format_xar.c archive_read_support_format_zip.c
            archive_string.c archive_string_composition.h
            archive_version_details.c archive_windows.c archive_windows.h
            archive_write.c archive_write_add_filter_gzip.c
            archive_write_disk_windows.c archive_write_set_format_7zip.c
            archive_write_set_format_gnutar.c archive_write_set_format_mtree.c
            archive_write_set_format_pax.c archive_write_set_format_xar.c
            archive_write_set_format_zip.c archive_write_set_options.3
            libarchive-formats.5
        pkgsrc/archivers/libarchive/files/libarchive/test: CMakeLists.txt
            list.h read_open_memory.c test_acl_platform_nfs4.c
            test_archive_match_time.c test_archive_string_conversion.c
            test_read_format_7zip.c test_read_format_rar.c
            test_read_format_rar5.c test_read_format_zip.c test_sparse_basic.c
            test_tar_large.c test_write_filter_gzip.c test_write_format_7zip.c
            test_write_format_7zip_large.c test_write_format_gnutar.c
            test_write_format_xar.c test_write_format_zip_file.c
            test_write_format_zip_file_zip64.c
        pkgsrc/archivers/libarchive/files/tar: CMakeLists.txt bsdtar.1 bsdtar.c
            bsdtar.h bsdtar_windows.h cmdline.c util.c write.c
        pkgsrc/archivers/libarchive/files/tar/test: CMakeLists.txt list.h
        pkgsrc/archivers/libarchive/files/test_utils: test_common.h test_main.c
            test_utils.c test_utils.h
        pkgsrc/archivers/libarchive/files/unzip: bsdunzip.c
Removed Files:
        pkgsrc/archivers/libarchive/files/libarchive: archive_getdate.c
            archive_getdate.h
        pkgsrc/archivers/libarchive/files/libarchive/test:
            test_archive_getdate.c

Log Message:
libarchive bsdtar: updated to 3.8.0

Libarchive 3.8.0 is a feature and bugfix release.

New features:
bsdtar: support --mtime and --clamp-mtime
lib: mbedtls 3.x compatibility
7-zip reader: improve self-extracting archive detection
xar: xmllite support for the XAR reader and writer
zip writer: added XZ, LZMA, ZSTD and BZIP2 support
zip writer: added LZMA + RISCV BCJ filter

Notable security fixes:
rar: do not skip past EOF while reading
rar: fix double free with over 4 billion nodes
rar: fix heap-buffer-overflow
warc: prevent signed integer overflow
tar: fix overflow in build_ustar_entry

Notable bugfixes:
bsdtar: don't hardlink negative inode files together
gz: allow setting the original filename for gzip compressed files
lib: improve lseek handling
lib: support @-prefixed Unix epoch timestamps as date strings
rar: support large headers on 32 bit systems
tar reader: Improve LFS support on 32 bit systems


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/archivers/libarchive/Makefile.common
cvs rdiff -u -r1.15 -r1.16 pkgsrc/archivers/libarchive/files/CMakeLists.txt
cvs rdiff -u -r1.7 -r1.8 pkgsrc/archivers/libarchive/files/COPYING
cvs rdiff -u -r1.18 -r1.19 pkgsrc/archivers/libarchive/files/Makefile.am
cvs rdiff -u -r1.20 -r1.21 pkgsrc/archivers/libarchive/files/Makefile.in \
    pkgsrc/archivers/libarchive/files/config.h.in
cvs rdiff -u -r1.19 -r1.20 pkgsrc/archivers/libarchive/files/NEWS
cvs rdiff -u -r1.6 -r1.7 pkgsrc/archivers/libarchive/files/README.md
cvs rdiff -u -r1.28 -r1.29 pkgsrc/archivers/libarchive/files/configure
cvs rdiff -u -r1.27 -r1.28 pkgsrc/archivers/libarchive/files/configure.ac
cvs rdiff -u -r1.4 -r1.5 pkgsrc/archivers/libarchive/files/build/autogen.sh
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/archivers/libarchive/files/build/bump-version.sh
cvs rdiff -u -r1.3 -r1.4 pkgsrc/archivers/libarchive/files/build/clean.sh
cvs rdiff -u -r1.14 -r1.15 pkgsrc/archivers/libarchive/files/build/version
cvs rdiff -u -r1.14 -r1.15 \
    pkgsrc/archivers/libarchive/files/build/cmake/config.h.in
cvs rdiff -u -r1.9 -r1.10 \
    pkgsrc/archivers/libarchive/files/contrib/libarchive.spec
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/archivers/libarchive/files/contrib/android/Android.mk
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt
cvs rdiff -u -r1.7 -r1.8 pkgsrc/archivers/libarchive/files/doc/update.sh
cvs rdiff -u -r1.14 -r1.15 \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html \
    pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html \
    pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html \
    pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html \
    pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html \
    pkgsrc/archivers/libarchive/files/doc/html/tar.5.html
cvs rdiff -u -r1.13 -r1.14 \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry_acl.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry_paths.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry_perms.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry_stat.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry_time.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_data.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_extract.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_filter.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_format.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_free.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_header.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_new.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_open.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_set_options.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_data.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_filter.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_format.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_free.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_header.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_new.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_open.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_options.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/libarchive_changes.3.html
cvs rdiff -u -r1.8 -r1.9 \
    pkgsrc/archivers/libarchive/files/doc/html/archive_entry_misc.3.html
cvs rdiff -u -r1.10 -r1.11 \
    pkgsrc/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html \
    pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/archivers/libarchive/files/doc/man/archive_read_format.3
cvs rdiff -u -r1.5 -r1.6 \
    pkgsrc/archivers/libarchive/files/doc/man/archive_write_set_options.3
cvs rdiff -u -r1.15 -r1.16 pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1
cvs rdiff -u -r1.7 -r1.8 \
    pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5
cvs rdiff -u -r1.14 -r1.15 \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_util.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/cpio.5.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/libarchive.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/mtree.5.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/tar.5.pdf
cvs rdiff -u -r1.13 -r1.14 \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf
cvs rdiff -u -r1.8 -r1.9 \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_misc.3.pdf
cvs rdiff -u -r1.10 -r1.11 \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdf \
    pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdf
cvs rdiff -u -r1.7 -r1.8 \
    pkgsrc/archivers/libarchive/files/doc/text/archive_read_format.3.txt
cvs rdiff -u -r1.9 -r1.10 \
    pkgsrc/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt \
    pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt
cvs rdiff -u -r1.13 -r1.14 \
    pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt
cvs rdiff -u -r1.7 -r1.8 \
    pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki
cvs rdiff -u -r1.8 -r1.9 \
    pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki \
    pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki
cvs rdiff -u -r1.12 -r1.13 \
    pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki
cvs rdiff -u -r1.11 -r1.12 \
    pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_posix.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c
cvs rdiff -u -r1.20 -r1.21 \
    pkgsrc/archivers/libarchive/files/libarchive/archive.h
cvs rdiff -u -r1.8 -r1.9 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_acl.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_match.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_pack_dev.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c \
    pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5
cvs rdiff -u -r1.5 -r1.6 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_acl_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_cryptor_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_options.3
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_cmdline.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_digest_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_options_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_platform_acl.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_platform_xattr.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_version_details.c
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_digest.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_entry_locale.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_hmac_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_options.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_format.3 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_string_composition.h
cvs rdiff -u -r1.16 -r1.17 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_entry.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
cvs rdiff -u -r1.9 -r1.10 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c
cvs rdiff -u -r1.10 -r1.11 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_windows.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_windows.c
cvs rdiff -u -r1.6 -r0 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_getdate.c
cvs rdiff -u -r1.3 -r0 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_getdate.h
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_random_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_rb.h
cvs rdiff -u -r1.15 -r1.16 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read.c
cvs rdiff -u -r1.7 -r1.8 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c
cvs rdiff -u -r1.12 -r1.13 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write.c
cvs rdiff -u -r1.13 -r1.14 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c
cvs rdiff -u -r1.17 -r1.18 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c
cvs rdiff -u -r1.14 -r1.15 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_string.c \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
cvs rdiff -u -r1.6 -r1.7 \
    pkgsrc/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c
cvs rdiff -u -r1.14 -r1.15 \
    pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt
cvs rdiff -u -r1.16 -r1.17 \
    pkgsrc/archivers/libarchive/files/libarchive/test/list.h
cvs rdiff -u -r1.8 -r1.9 \
    pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c
cvs rdiff -u -r1.9 -r1.10 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c
cvs rdiff -u -r1.3 -r0 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_getdate.c
cvs rdiff -u -r1.5 -r1.6 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_match_time.c \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_string_conversion.c \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c
cvs rdiff -u -r1.6 -r1.7 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar.c \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c
cvs rdiff -u -r1.11 -r1.12 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c
cvs rdiff -u -r1.10 -r1.11 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_sparse_basic.c
cvs rdiff -u -r1.7 -r1.8 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip.c
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip_large.c \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_gnutar.c \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_xar.c
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c \
    pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c
cvs rdiff -u -r1.4 -r1.5 pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt
cvs rdiff -u -r1.16 -r1.17 pkgsrc/archivers/libarchive/files/tar/bsdtar.1 \
    pkgsrc/archivers/libarchive/files/tar/bsdtar.c
cvs rdiff -u -r1.13 -r1.14 pkgsrc/archivers/libarchive/files/tar/bsdtar.h
cvs rdiff -u -r1.5 -r1.6 \
    pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h
cvs rdiff -u -r1.11 -r1.12 pkgsrc/archivers/libarchive/files/tar/cmdline.c
cvs rdiff -u -r1.12 -r1.13 pkgsrc/archivers/libarchive/files/tar/util.c
cvs rdiff -u -r1.15 -r1.16 pkgsrc/archivers/libarchive/files/tar/write.c
cvs rdiff -u -r1.12 -r1.13 \
    pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt
cvs rdiff -u -r1.11 -r1.12 pkgsrc/archivers/libarchive/files/tar/test/list.h
cvs rdiff -u -r1.11 -r1.12 \
    pkgsrc/archivers/libarchive/files/test_utils/test_common.h
cvs rdiff -u -r1.9 -r1.10 \
    pkgsrc/archivers/libarchive/files/test_utils/test_main.c
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/archivers/libarchive/files/test_utils/test_utils.c \
    pkgsrc/archivers/libarchive/files/test_utils/test_utils.h
cvs rdiff -u -r1.7 -r1.8 pkgsrc/archivers/libarchive/files/unzip/bsdunzip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/archivers/libarchive/Makefile.common
diff -u pkgsrc/archivers/libarchive/Makefile.common:1.20 pkgsrc/archivers/libarchive/Makefile.common:1.21
--- pkgsrc/archivers/libarchive/Makefile.common:1.20    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/Makefile.common Wed May 21 15:25:47 2025
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.common,v 1.20 2025/04/28 10:31:33 adam Exp $
+# $NetBSD: Makefile.common,v 1.21 2025/05/21 15:25:47 adam Exp $
 # used by archivers/bsdtar/Makefile
 # used by archivers/libarchive/Makefile
 
-DISTNAME=      libarchive-3.7.9
+DISTNAME=      libarchive-3.8.0
 CATEGORIES=    archivers
 MASTER_SITES=  https://www.libarchive.org/downloads/
 DISTFILES=     # empty

Index: pkgsrc/archivers/libarchive/files/CMakeLists.txt
diff -u pkgsrc/archivers/libarchive/files/CMakeLists.txt:1.15 pkgsrc/archivers/libarchive/files/CMakeLists.txt:1.16
--- pkgsrc/archivers/libarchive/files/CMakeLists.txt:1.15       Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/CMakeLists.txt    Wed May 21 15:25:47 2025
@@ -94,6 +94,9 @@ set(MACHO_CURRENT_VERSION "${MACHO_COMPA
 # saving and restoring the state of the variables.
 INCLUDE(CMakePushCheckState)
 
+# Enable the pkg-config helpers.
+INCLUDE(FindPkgConfig)
+
 # Initialize the state of the variables. This initialization is not
 # necessary but this shows you what value the variables initially have.
 SET(CMAKE_REQUIRED_DEFINITIONS)
@@ -225,6 +228,7 @@ OPTION(ENABLE_ZLIB "Enable the use of th
 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_WIN32_XMLLITE "Enable the use of the Windows XmlLite 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)
@@ -353,10 +357,12 @@ ENDMACRO (GENERATE_LIST_H)
 # Generate installation rules for man pages.
 #
 MACRO (INSTALL_MAN __mans)
-  FOREACH (_man ${ARGV})
-    STRING(REGEX REPLACE "^.+[.]([1-9])" "\\1" _mansect ${_man})
-    INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}")
-  ENDFOREACH (_man)
+  IF(ENABLE_INSTALL)
+    FOREACH (_man ${ARGV})
+      STRING(REGEX REPLACE "^.+[.]([1-9])" "\\1" _mansect ${_man})
+      INSTALL(FILES ${_man} DESTINATION "share/man/man${_mansect}")
+    ENDFOREACH (_man)
+  ENDIF(ENABLE_INSTALL)
 ENDMACRO (INSTALL_MAN __mans)
 #
 # Find out what macro is needed to use libraries on Windows.
@@ -581,6 +587,7 @@ IF(ENABLE_LIBB2)
   FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBB2 DEFAULT_MSG LIBB2_LIBRARY LIBB2_INCLUDE_DIR)
 ELSE(ENABLE_LIBB2)
   SET(LIBB2_FOUND FALSE) # Override cached value
+  UNSET(LIBB2_PKGCONFIG_VERSION CACHE)
 ENDIF(ENABLE_LIBB2)
 IF(LIBB2_FOUND)
   SET(HAVE_LIBB2 1)
@@ -593,8 +600,13 @@ IF(LIBB2_FOUND)
   SET(CMAKE_REQUIRED_INCLUDES ${LIBB2_INCLUDE_DIR})
   CHECK_FUNCTION_EXISTS(blake2sp_init HAVE_LIBB2)
   CMAKE_POP_CHECK_STATE()
+  pkg_check_modules(LIBB2 libb2)
+  IF(LIBB2_VERSION)
+    SET(LIBB2_PKGCONFIG_VERSION LIBB2_VERSION)
+  ENDIF(LIBB2_VERSION)
 ELSE(LIBB2_FOUND)
   SET(ARCHIVE_BLAKE2 TRUE)
+  UNSET(LIBB2_PKGCONFIG_VERSION CACHE)
 ENDIF(LIBB2_FOUND)
 #
 # Find LZ4
@@ -657,6 +669,7 @@ IF(ZSTD_FOUND)
   SET(CMAKE_REQUIRED_INCLUDES ${ZSTD_INCLUDE_DIR})
   CHECK_FUNCTION_EXISTS(ZSTD_decompressStream HAVE_LIBZSTD)
   CHECK_FUNCTION_EXISTS(ZSTD_compressStream HAVE_ZSTD_compressStream)
+  CHECK_FUNCTION_EXISTS(ZSTD_minCLevel HAVE_ZSTD_minCLevel)
   #
   # TODO: test for static library.
   #
@@ -665,7 +678,6 @@ ENDIF(ZSTD_FOUND)
 MARK_AS_ADVANCED(CLEAR ZSTD_INCLUDE_DIR)
 MARK_AS_ADVANCED(CLEAR ZSTD_LIBRARY)
 
-
 #
 # Check headers
 #
@@ -796,7 +808,7 @@ IF(ENABLE_MBEDTLS)
     LA_CHECK_INCLUDE_FILE("mbedtls/aes.h" HAVE_MBEDTLS_AES_H)
     LA_CHECK_INCLUDE_FILE("mbedtls/md.h" HAVE_MBEDTLS_MD_H)
     LA_CHECK_INCLUDE_FILE("mbedtls/pkcs5.h" HAVE_MBEDTLS_PKCS5_H)
-
+    LA_CHECK_INCLUDE_FILE("mbedtls/version.h" HAVE_MBEDTLS_VERSION_H)
   ENDIF(MBEDTLS_FOUND)
   MARK_AS_ADVANCED(CLEAR MBEDTLS_INCLUDE_DIRS)
   MARK_AS_ADVANCED(CLEAR MBEDCRYPTO_LIBRARY)
@@ -819,7 +831,7 @@ IF(ENABLE_NETTLE)
     LA_CHECK_INCLUDE_FILE("nettle/pbkdf2.h" HAVE_NETTLE_PBKDF2_H)
     LA_CHECK_INCLUDE_FILE("nettle/ripemd160.h" HAVE_NETTLE_RIPEMD160_H)
     LA_CHECK_INCLUDE_FILE("nettle/sha.h" HAVE_NETTLE_SHA_H)
-
+    LA_CHECK_INCLUDE_FILE("nettle/version.h" HAVE_NETTLE_VERSION_H)
   ENDIF(NETTLE_FOUND)
   MARK_AS_ADVANCED(CLEAR NETTLE_INCLUDE_DIR)
   MARK_AS_ADVANCED(CLEAR NETTLE_LIBRARIES)
@@ -838,6 +850,7 @@ IF(ENABLE_OPENSSL AND NOT CMAKE_SYSTEM_N
     SET(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_CRYPTO_LIBRARY})
     SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
     LA_CHECK_INCLUDE_FILE("openssl/evp.h" HAVE_OPENSSL_EVP_H)
+    LA_CHECK_INCLUDE_FILE("openssl/opensslv.h" HAVE_OPENSSL_OPENSSLV_H)
     CHECK_FUNCTION_EXISTS(PKCS5_PBKDF2_HMAC_SHA1 HAVE_PKCS5_PBKDF2_HMAC_SHA1)
   ENDIF(OPENSSL_FOUND)
 ELSE()
@@ -1045,7 +1058,6 @@ main(int argc, char **argv)
                "${OUTPUT}\n"
                "Source file was:\n${SOURCE}\n")
        ENDIF (ARCHIVE_CRYPTO_${CRYPTO}_WIN)
-
       ENDIF(NOT DEFINED ARCHIVE_CRYPTO_${CRYPTO}_WIN)
       ENDIF(NOT ARCHIVE_CRYPTO_${CRYPTO})
     ENDFOREACH(CRYPTO)
@@ -1138,6 +1150,7 @@ IF(ENABLE_ICONV)
       CHECK_ICONV("libiconv" "const")
       CHECK_ICONV("libiconv" "")
       IF (HAVE_ICONV)
+        SET(HAVE_LIBICONV 1)
         LIST(APPEND ADDITIONAL_LIBS ${LIBICONV_PATH})
       ENDIF(HAVE_ICONV)
     ENDIF(NOT HAVE_ICONV AND LIBICONV_PATH)
@@ -1181,6 +1194,7 @@ ELSE(ENABLE_ICONV)
   # (once enabled).
   UNSET(HAVE_LOCALE_CHARSET CACHE)
   UNSET(HAVE_ICONV CACHE)
+  UNSET(HAVE_LIBICONV CACHE)
   UNSET(HAVE_ICONV_libc_ CACHE)
   UNSET(HAVE_ICONV_libc_const CACHE)
   UNSET(HAVE_ICONV_libiconv_ CACHE)
@@ -1210,6 +1224,7 @@ IF(LIBXML2_FOUND)
   SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
   CHECK_INCLUDE_FILES("libxml/xmlreader.h" HAVE_LIBXML_XMLREADER_H)
   CHECK_INCLUDE_FILES("libxml/xmlwriter.h" HAVE_LIBXML_XMLWRITER_H)
+  CHECK_INCLUDE_FILES("libxml/xmlversion.h" HAVE_LIBXML_XMLVERSION_H)
   # Test if a macro is needed for the library.
   TRY_MACRO_FOR_LIBRARY(
     "${ICONV_INCLUDE_DIR};${LIBXML2_INCLUDE_DIR}"
@@ -1237,6 +1252,25 @@ ELSE(LIBXML2_FOUND)
     SET(HAVE_LIBEXPAT 1)
     LA_CHECK_INCLUDE_FILE("expat.h" HAVE_EXPAT_H)
     CMAKE_POP_CHECK_STATE()    # Restore the state of the variables
+  ELSE(EXPAT_FOUND)
+    IF(WIN32 AND ENABLE_WIN32_XMLLITE)
+      # Check linkage as well; versions of mingw-w64 before v11.0.0
+      # do not contain an import library for xmllite.
+      cmake_push_check_state()
+      SET(CMAKE_REQUIRED_LIBRARIES "xmllite")
+      check_c_source_compiles("
+      #include <initguid.h>
+      #include <xmllite.h>
+      int main() {
+        return CreateXmlReader(&IID_IXmlReader, NULL, NULL);
+      }
+      " HAVE_XMLLITE_H)
+      cmake_pop_check_state()
+      IF(HAVE_XMLLITE_H)
+        SET(XMLLITE_FOUND TRUE)
+        LIST(APPEND ADDITIONAL_LIBS "xmllite")
+      ENDIF()
+    ENDIF()
   ENDIF(EXPAT_FOUND)
 ENDIF(LIBXML2_FOUND)
 MARK_AS_ADVANCED(CLEAR LIBXML2_INCLUDE_DIR)
@@ -1790,11 +1824,16 @@ IF(ENABLE_XATTR)
   CHECK_LIBRARY_EXISTS(attr "setxattr" "" HAVE_LIBATTR)
   IF(HAVE_LIBATTR)
     SET(CMAKE_REQUIRED_LIBRARIES "attr")
-  ELSE()
+         pkg_check_modules(LIBATTR libattr)
+         IF(LIBATTR_VERSION)
+           SET(LIBATTR_PKGCONFIG_VERSION ${LIBATTR_VERSION})
+         ENDIF(LIBATTR_VERSION)
+  ELSE(HAVE_LIBATTR)
     CHECK_LIBRARY_EXISTS(gnu "setxattr" "" HAVE_LIBATTR_GNU)
     IF(HAVE_LIBATTR_GNU)
       SET(CMAKE_REQUIRED_LIBRARIES "gnu")
     ENDIF()
+    UNSET(LIBATTR_PKGCONFIG_VERSION CACHE)
   ENDIF(HAVE_LIBATTR)
   CHECK_SYMBOL_EXISTS(EXTATTR_NAMESPACE_USER "sys/types.h;sys/extattr.h" HAVE_DECL_EXTATTR_NAMESPACE_USER)
   CHECK_SYMBOL_EXISTS(XATTR_NOFOLLOW "sys/xattr.h" HAVE_DECL_XATTR_NOFOLLOW)
@@ -1912,6 +1951,12 @@ IF(ENABLE_ACL)
     SET(CMAKE_REQUIRED_LIBRARIES "acl")
     FIND_LIBRARY(ACL_LIBRARY NAMES acl)
     LIST(APPEND ADDITIONAL_LIBS ${ACL_LIBRARY})
+         pkg_check_modules(LIBACL libacl)
+         IF(LIBACL_VERSION)
+           SET(LIBACL_PKGCONFIG_VERSION ${LIBACL_VERSION})
+         ENDIF(LIBACL_VERSION)
+  ELSE(HAVE_LIBACL)
+    UNSET(LIBACL_PKGCONFIG_VERSION CACHE)
   ENDIF(HAVE_LIBACL)
 
   CHECK_TYPE_EXISTS(acl_t "sys/types.h;sys/acl.h" HAVE_ACL_T)
@@ -2051,6 +2096,12 @@ int main(void) { return ACL_SYNCHRONIZE;
     SET(CMAKE_REQUIRED_LIBRARIES "richacl")
     FIND_LIBRARY(RICHACL_LIBRARY NAMES richacl)
     LIST(APPEND ADDITIONAL_LIBS ${RICHACL_LIBRARY})
+         pkg_check_modules(LIBRICHACL librichacl)
+         IF(LIBRICHACL_VERSION)
+           SET(LIBRICHACL_PKGCONFIG_VERSION ${LIBRICHACL_VERSION})
+         ENDIF(LIBRICHACL_VERSION)
+  ELSE(HAVE_LIBRICHACL)
+    UNSET(LIBRICHACL_PKGCONFIG_VERSION CACHE)
   ENDIF(HAVE_LIBRICHACL)
 
   CHECK_STRUCT_HAS_MEMBER("struct richace" e_type "sys/richacl.h"
@@ -2150,7 +2201,7 @@ INCLUDE(CreatePkgConfigFile)
 #
 # Register installation of PDF documents.
 #
-IF(WIN32 AND NOT CYGWIN)
+IF(WIN32 AND NOT CYGWIN AND ENABLE_INSTALL)
   #
   # On Windows platform, It's better that we install PDF documents
   # on one's computer.
@@ -2162,7 +2213,7 @@ IF(WIN32 AND NOT CYGWIN)
             FILES_MATCHING PATTERN "*.pdf"
     )
   ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/doc/pdf)
-ENDIF(WIN32 AND NOT CYGWIN)
+ENDIF(WIN32 AND NOT CYGWIN AND ENABLE_INSTALL)
 #
 #
 #

Index: pkgsrc/archivers/libarchive/files/COPYING
diff -u pkgsrc/archivers/libarchive/files/COPYING:1.7 pkgsrc/archivers/libarchive/files/COPYING:1.8
--- pkgsrc/archivers/libarchive/files/COPYING:1.7       Thu Jan 18 18:00:11 2024
+++ pkgsrc/archivers/libarchive/files/COPYING   Wed May 21 15:25:47 2025
@@ -20,7 +20,7 @@ the actual statements in the files are c
    libarchive/mtree.5
 
 * The following source files are in the public domain:
-   libarchive/archive_getdate.c
+   libarchive/archive_parse_date.c
 
 * The following source files are triple-licensed with the ability to choose
   from CC0 1.0 Universal, OpenSSL or Apache 2.0 licenses:

Index: pkgsrc/archivers/libarchive/files/Makefile.am
diff -u pkgsrc/archivers/libarchive/files/Makefile.am:1.18 pkgsrc/archivers/libarchive/files/Makefile.am:1.19
--- pkgsrc/archivers/libarchive/files/Makefile.am:1.18  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/Makefile.am       Wed May 21 15:25:47 2025
@@ -118,8 +118,6 @@ libarchive_la_SOURCES= \
        libarchive/archive_entry_stat.c \
        libarchive/archive_entry_strmode.c \
        libarchive/archive_entry_xattr.c \
-       libarchive/archive_getdate.c \
-       libarchive/archive_getdate.h \
        libarchive/archive_hmac.c \
        libarchive/archive_hmac_private.h \
        libarchive/archive_match.c \
@@ -129,6 +127,7 @@ libarchive_la_SOURCES= \
        libarchive/archive_options_private.h \
        libarchive/archive_pack_dev.h \
        libarchive/archive_pack_dev.c \
+       libarchive/archive_parse_date.c \
        libarchive/archive_pathmatch.c \
        libarchive/archive_pathmatch.h \
        libarchive/archive_platform.h \
@@ -197,6 +196,8 @@ libarchive_la_SOURCES= \
        libarchive/archive_string.h \
        libarchive/archive_string_composition.h \
        libarchive/archive_string_sprintf.c \
+       libarchive/archive_time.c \
+       libarchive/archive_time_private.h \
        libarchive/archive_util.c \
        libarchive/archive_version_details.c \
        libarchive/archive_virtual.c \
@@ -377,10 +378,10 @@ libarchive_test_SOURCES= \
        libarchive/test/test_archive_clear_error.c \
        libarchive/test/test_archive_cmdline.c \
        libarchive/test/test_archive_digest.c \
-       libarchive/test/test_archive_getdate.c \
        libarchive/test/test_archive_match_owner.c \
        libarchive/test/test_archive_match_path.c \
        libarchive/test/test_archive_match_time.c \
+       libarchive/test/test_archive_parse_date.c \
        libarchive/test/test_archive_pathmatch.c \
        libarchive/test/test_archive_read.c \
        libarchive/test/test_archive_read_add_passphrase.c \
@@ -489,6 +490,7 @@ libarchive_test_SOURCES= \
        libarchive/test/test_read_format_gtar_filename.c \
        libarchive/test/test_read_format_gtar_gz.c \
        libarchive/test/test_read_format_gtar_lzma.c \
+       libarchive/test/test_read_format_gtar_redundant_L.c \
        libarchive/test/test_read_format_gtar_sparse.c \
        libarchive/test/test_read_format_gtar_sparse_length.c \
        libarchive/test/test_read_format_gtar_sparse_skip_entry.c \
@@ -519,6 +521,7 @@ libarchive_test_SOURCES= \
        libarchive/test/test_read_format_rar_encryption_header.c \
        libarchive/test/test_read_format_rar_filter.c \
        libarchive/test/test_read_format_rar_invalid1.c \
+       libarchive/test/test_read_format_rar_overflow.c \
        libarchive/test/test_read_format_rar5.c \
        libarchive/test/test_read_format_raw.c \
        libarchive/test/test_read_format_tar.c \
@@ -528,6 +531,7 @@ libarchive_test_SOURCES= \
        libarchive/test/test_read_format_tar_empty_with_gnulabel.c \
        libarchive/test/test_read_format_tar_filename.c \
        libarchive/test/test_read_format_tar_invalid_pax_size.c \
+       libarchive/test/test_read_format_tar_pax_g_large.c \
        libarchive/test/test_read_format_tar_pax_large_attr.c \
        libarchive/test/test_read_format_tbz.c \
        libarchive/test/test_read_format_tgz.c \
@@ -629,6 +633,7 @@ libarchive_test_SOURCES= \
        libarchive/test/test_write_format_mtree_classic_indent.c\
        libarchive/test/test_write_format_mtree_fflags.c \
        libarchive/test/test_write_format_mtree_no_separator.c \
+       libarchive/test/test_write_format_mtree_preset_digests.c \
        libarchive/test/test_write_format_mtree_quoted_filename.c\
        libarchive/test/test_write_format_pax.c \
        libarchive/test/test_write_format_raw.c \
@@ -646,6 +651,9 @@ libarchive_test_SOURCES= \
        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_compression_zstd.c \
+       libarchive/test/test_write_format_zip_compression_bzip2.c \
+       libarchive/test/test_write_format_zip_compression_lzmaxz.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 \
@@ -806,11 +814,16 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_read_format_7zip_lzma2.7z.uu \
        libarchive/test/test_read_format_7zip_lzma2_arm64.7z.uu \
        libarchive/test/test_read_format_7zip_lzma2_arm.7z.uu \
+       libarchive/test/test_read_format_7zip_lzma2_powerpc.7z.uu \
+       libarchive/test/test_read_format_7zip_lzma2_riscv.7z.uu \
        libarchive/test/test_read_format_7zip_lzma2_sparc.7z.uu \
        libarchive/test/test_read_format_7zip_malformed.7z.uu \
        libarchive/test/test_read_format_7zip_malformed2.7z.uu \
        libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu \
        libarchive/test/test_read_format_7zip_ppmd.7z.uu \
+       libarchive/test/test_read_format_7zip_sfx_elf.elf.uu \
+       libarchive/test/test_read_format_7zip_sfx_modified_pe.exe.uu \
+       libarchive/test/test_read_format_7zip_sfx_pe.exe.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 \
@@ -836,6 +849,7 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_read_format_gtar_filename_cp866.tar.Z.uu \
        libarchive/test/test_read_format_gtar_filename_eucjp.tar.Z.uu \
        libarchive/test/test_read_format_gtar_filename_koi8r.tar.Z.uu \
+       libarchive/test/test_read_format_gtar_redundant_L.tar.Z.uu \
        libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu \
        libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu \
        libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu \
@@ -881,6 +895,7 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_read_format_rar_encryption_data.rar.uu \
        libarchive/test/test_read_format_rar_encryption_header.rar.uu \
        libarchive/test/test_read_format_rar_encryption_partially.rar.uu \
+       libarchive/test/test_read_format_rar_endarc_huge.rar.uu \
        libarchive/test/test_read_format_rar_filter.rar.uu \
        libarchive/test/test_read_format_rar_invalid1.rar.uu \
        libarchive/test/test_read_format_rar_multi_lzss_blocks.rar.uu \
@@ -888,12 +903,15 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_read_format_rar_multivolume.part0002.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0003.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0004.rar.uu \
+       libarchive/test/test_read_format_rar_newsub_huge.rar.uu \
        libarchive/test/test_read_format_rar_noeof.rar.uu \
+       libarchive/test/test_read_format_rar_overflow.rar.uu \
        libarchive/test/test_read_format_rar_ppmd_lzss_conversion.rar.uu \
        libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu \
        libarchive/test/test_read_format_rar_ppmd_use_after_free2.rar.uu \
        libarchive/test/test_read_format_rar_sfx.exe.uu \
        libarchive/test/test_read_format_rar_subblock.rar.uu \
+       libarchive/test/test_read_format_rar_symlink_huge.rar.uu \
        libarchive/test/test_read_format_rar_unicode.rar.uu \
        libarchive/test/test_read_format_rar_windows.rar.uu \
        libarchive/test/test_read_format_rar4_encrypted.rar.uu \
@@ -957,11 +975,13 @@ libarchive_test_EXTRA_DIST=\
        libarchive/test/test_read_format_tar_empty_pax.tar.Z.uu \
        libarchive/test/test_read_format_tar_filename_koi8r.tar.Z.uu \
        libarchive/test/test_read_format_tar_invalid_pax_size.tar.uu \
+       libarchive/test/test_read_format_tar_pax_g_large.tar.uu \
        libarchive/test/test_read_format_tar_pax_large_attr.tar.Z.uu \
        libarchive/test/test_read_format_ustar_filename_cp866.tar.Z.uu \
        libarchive/test/test_read_format_ustar_filename_eucjp.tar.Z.uu \
        libarchive/test/test_read_format_ustar_filename_koi8r.tar.Z.uu \
        libarchive/test/test_read_format_warc.warc.uu \
+       libarchive/test/test_read_format_warc_incomplete.warc.uu \
        libarchive/test/test_read_format_xar_doublelink.xar.uu \
        libarchive/test/test_read_format_xar_duplicate_filename_node.xar.uu \
        libarchive/test/test_read_format_zip.zip.uu \
@@ -1158,6 +1178,7 @@ bsdtar_test_SOURCES= \
        tar/test/test_option_lz4.c \
        tar/test/test_option_lzma.c \
        tar/test/test_option_lzop.c \
+       tar/test/test_option_mtime.c \
        tar/test/test_option_n.c \
        tar/test/test_option_newer_than.c \
        tar/test/test_option_nodump.c \

Index: pkgsrc/archivers/libarchive/files/Makefile.in
diff -u pkgsrc/archivers/libarchive/files/Makefile.in:1.20 pkgsrc/archivers/libarchive/files/Makefile.in:1.21
--- pkgsrc/archivers/libarchive/files/Makefile.in:1.20  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/Makefile.in       Wed May 21 15:25:47 2025
@@ -210,16 +210,15 @@ am__libarchive_la_SOURCES_DIST = libarch
        libarchive/archive_entry_sparse.c \
        libarchive/archive_entry_stat.c \
        libarchive/archive_entry_strmode.c \
-       libarchive/archive_entry_xattr.c libarchive/archive_getdate.c \
-       libarchive/archive_getdate.h libarchive/archive_hmac.c \
+       libarchive/archive_entry_xattr.c libarchive/archive_hmac.c \
        libarchive/archive_hmac_private.h libarchive/archive_match.c \
        libarchive/archive_openssl_evp_private.h \
        libarchive/archive_openssl_hmac_private.h \
        libarchive/archive_options.c \
        libarchive/archive_options_private.h \
        libarchive/archive_pack_dev.h libarchive/archive_pack_dev.c \
-       libarchive/archive_pathmatch.c libarchive/archive_pathmatch.h \
-       libarchive/archive_platform.h \
+       libarchive/archive_parse_date.c libarchive/archive_pathmatch.c \
+       libarchive/archive_pathmatch.h libarchive/archive_platform.h \
        libarchive/archive_platform_acl.h \
        libarchive/archive_platform_xattr.h \
        libarchive/archive_ppmd_private.h libarchive/archive_ppmd7.c \
@@ -278,7 +277,8 @@ am__libarchive_la_SOURCES_DIST = libarch
        libarchive/archive_read_support_format_zip.c \
        libarchive/archive_string.c libarchive/archive_string.h \
        libarchive/archive_string_composition.h \
-       libarchive/archive_string_sprintf.c libarchive/archive_util.c \
+       libarchive/archive_string_sprintf.c libarchive/archive_time.c \
+       libarchive/archive_time_private.h libarchive/archive_util.c \
        libarchive/archive_version_details.c \
        libarchive/archive_virtual.c libarchive/archive_write.c \
        libarchive/archive_write_disk_posix.c \
@@ -364,13 +364,13 @@ am_libarchive_la_OBJECTS = libarchive/ar
        libarchive/archive_entry_sparse.lo \
        libarchive/archive_entry_stat.lo \
        libarchive/archive_entry_strmode.lo \
-       libarchive/archive_entry_xattr.lo \
-       libarchive/archive_getdate.lo libarchive/archive_hmac.lo \
+       libarchive/archive_entry_xattr.lo libarchive/archive_hmac.lo \
        libarchive/archive_match.lo libarchive/archive_options.lo \
-       libarchive/archive_pack_dev.lo libarchive/archive_pathmatch.lo \
-       libarchive/archive_ppmd7.lo libarchive/archive_ppmd8.lo \
-       libarchive/archive_random.lo libarchive/archive_rb.lo \
-       libarchive/archive_read.lo \
+       libarchive/archive_pack_dev.lo \
+       libarchive/archive_parse_date.lo \
+       libarchive/archive_pathmatch.lo libarchive/archive_ppmd7.lo \
+       libarchive/archive_ppmd8.lo libarchive/archive_random.lo \
+       libarchive/archive_rb.lo libarchive/archive_read.lo \
        libarchive/archive_read_add_passphrase.lo \
        libarchive/archive_read_append_filter.lo \
        libarchive/archive_read_data_into_fd.lo \
@@ -419,7 +419,7 @@ am_libarchive_la_OBJECTS = libarchive/ar
        libarchive/archive_read_support_format_zip.lo \
        libarchive/archive_string.lo \
        libarchive/archive_string_sprintf.lo \
-       libarchive/archive_util.lo \
+       libarchive/archive_time.lo libarchive/archive_util.lo \
        libarchive/archive_version_details.lo \
        libarchive/archive_virtual.lo libarchive/archive_write.lo \
        libarchive/archive_write_disk_posix.lo \
@@ -640,6 +640,7 @@ am_bsdtar_test_OBJECTS = $(am__objects_1
        tar/test/bsdtar_test-test_option_lz4.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_lzma.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_lzop.$(OBJEXT) \
+       tar/test/bsdtar_test-test_option_mtime.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_n.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_newer_than.$(OBJEXT) \
        tar/test/bsdtar_test-test_option_nodump.$(OBJEXT) \
@@ -715,16 +716,15 @@ am__libarchive_test_SOURCES_DIST = libar
        libarchive/archive_entry_sparse.c \
        libarchive/archive_entry_stat.c \
        libarchive/archive_entry_strmode.c \
-       libarchive/archive_entry_xattr.c libarchive/archive_getdate.c \
-       libarchive/archive_getdate.h libarchive/archive_hmac.c \
+       libarchive/archive_entry_xattr.c libarchive/archive_hmac.c \
        libarchive/archive_hmac_private.h libarchive/archive_match.c \
        libarchive/archive_openssl_evp_private.h \
        libarchive/archive_openssl_hmac_private.h \
        libarchive/archive_options.c \
        libarchive/archive_options_private.h \
        libarchive/archive_pack_dev.h libarchive/archive_pack_dev.c \
-       libarchive/archive_pathmatch.c libarchive/archive_pathmatch.h \
-       libarchive/archive_platform.h \
+       libarchive/archive_parse_date.c libarchive/archive_pathmatch.c \
+       libarchive/archive_pathmatch.h libarchive/archive_platform.h \
        libarchive/archive_platform_acl.h \
        libarchive/archive_platform_xattr.h \
        libarchive/archive_ppmd_private.h libarchive/archive_ppmd7.c \
@@ -783,7 +783,8 @@ am__libarchive_test_SOURCES_DIST = libar
        libarchive/archive_read_support_format_zip.c \
        libarchive/archive_string.c libarchive/archive_string.h \
        libarchive/archive_string_composition.h \
-       libarchive/archive_string_sprintf.c libarchive/archive_util.c \
+       libarchive/archive_string_sprintf.c libarchive/archive_time.c \
+       libarchive/archive_time_private.h libarchive/archive_util.c \
        libarchive/archive_version_details.c \
        libarchive/archive_virtual.c libarchive/archive_write.c \
        libarchive/archive_write_disk_posix.c \
@@ -859,10 +860,10 @@ am__libarchive_test_SOURCES_DIST = libar
        libarchive/test/test_archive_clear_error.c \
        libarchive/test/test_archive_cmdline.c \
        libarchive/test/test_archive_digest.c \
-       libarchive/test/test_archive_getdate.c \
        libarchive/test/test_archive_match_owner.c \
        libarchive/test/test_archive_match_path.c \
        libarchive/test/test_archive_match_time.c \
+       libarchive/test/test_archive_parse_date.c \
        libarchive/test/test_archive_pathmatch.c \
        libarchive/test/test_archive_read.c \
        libarchive/test/test_archive_read_add_passphrase.c \
@@ -971,6 +972,7 @@ am__libarchive_test_SOURCES_DIST = libar
        libarchive/test/test_read_format_gtar_filename.c \
        libarchive/test/test_read_format_gtar_gz.c \
        libarchive/test/test_read_format_gtar_lzma.c \
+       libarchive/test/test_read_format_gtar_redundant_L.c \
        libarchive/test/test_read_format_gtar_sparse.c \
        libarchive/test/test_read_format_gtar_sparse_length.c \
        libarchive/test/test_read_format_gtar_sparse_skip_entry.c \
@@ -1001,6 +1003,7 @@ am__libarchive_test_SOURCES_DIST = libar
        libarchive/test/test_read_format_rar_encryption_header.c \
        libarchive/test/test_read_format_rar_filter.c \
        libarchive/test/test_read_format_rar_invalid1.c \
+       libarchive/test/test_read_format_rar_overflow.c \
        libarchive/test/test_read_format_rar5.c \
        libarchive/test/test_read_format_raw.c \
        libarchive/test/test_read_format_tar.c \
@@ -1010,6 +1013,7 @@ am__libarchive_test_SOURCES_DIST = libar
        libarchive/test/test_read_format_tar_empty_with_gnulabel.c \
        libarchive/test/test_read_format_tar_filename.c \
        libarchive/test/test_read_format_tar_invalid_pax_size.c \
+       libarchive/test/test_read_format_tar_pax_g_large.c \
        libarchive/test/test_read_format_tar_pax_large_attr.c \
        libarchive/test/test_read_format_tbz.c \
        libarchive/test/test_read_format_tgz.c \
@@ -1111,6 +1115,7 @@ am__libarchive_test_SOURCES_DIST = libar
        libarchive/test/test_write_format_mtree_classic_indent.c \
        libarchive/test/test_write_format_mtree_fflags.c \
        libarchive/test/test_write_format_mtree_no_separator.c \
+       libarchive/test/test_write_format_mtree_preset_digests.c \
        libarchive/test/test_write_format_mtree_quoted_filename.c \
        libarchive/test/test_write_format_pax.c \
        libarchive/test/test_write_format_raw.c \
@@ -1128,6 +1133,9 @@ am__libarchive_test_SOURCES_DIST = libar
        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_compression_zstd.c \
+       libarchive/test/test_write_format_zip_compression_bzip2.c \
+       libarchive/test/test_write_format_zip_compression_lzmaxz.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 \
@@ -1164,11 +1172,11 @@ am__objects_20 = libarchive/test-archive
        libarchive/test-archive_entry_stat.$(OBJEXT) \
        libarchive/test-archive_entry_strmode.$(OBJEXT) \
        libarchive/test-archive_entry_xattr.$(OBJEXT) \
-       libarchive/test-archive_getdate.$(OBJEXT) \
        libarchive/test-archive_hmac.$(OBJEXT) \
        libarchive/test-archive_match.$(OBJEXT) \
        libarchive/test-archive_options.$(OBJEXT) \
        libarchive/test-archive_pack_dev.$(OBJEXT) \
+       libarchive/test-archive_parse_date.$(OBJEXT) \
        libarchive/test-archive_pathmatch.$(OBJEXT) \
        libarchive/test-archive_ppmd7.$(OBJEXT) \
        libarchive/test-archive_ppmd8.$(OBJEXT) \
@@ -1223,6 +1231,7 @@ am__objects_20 = libarchive/test-archive
        libarchive/test-archive_read_support_format_zip.$(OBJEXT) \
        libarchive/test-archive_string.$(OBJEXT) \
        libarchive/test-archive_string_sprintf.$(OBJEXT) \
+       libarchive/test-archive_time.$(OBJEXT) \
        libarchive/test-archive_util.$(OBJEXT) \
        libarchive/test-archive_version_details.$(OBJEXT) \
        libarchive/test-archive_virtual.$(OBJEXT) \
@@ -1290,10 +1299,10 @@ am_libarchive_test_OBJECTS = $(am__objec
        libarchive/test/test-test_archive_clear_error.$(OBJEXT) \
        libarchive/test/test-test_archive_cmdline.$(OBJEXT) \
        libarchive/test/test-test_archive_digest.$(OBJEXT) \
-       libarchive/test/test-test_archive_getdate.$(OBJEXT) \
        libarchive/test/test-test_archive_match_owner.$(OBJEXT) \
        libarchive/test/test-test_archive_match_path.$(OBJEXT) \
        libarchive/test/test-test_archive_match_time.$(OBJEXT) \
+       libarchive/test/test-test_archive_parse_date.$(OBJEXT) \
        libarchive/test/test-test_archive_pathmatch.$(OBJEXT) \
        libarchive/test/test-test_archive_read.$(OBJEXT) \
        libarchive/test/test-test_archive_read_add_passphrase.$(OBJEXT) \
@@ -1402,6 +1411,7 @@ am_libarchive_test_OBJECTS = $(am__objec
        libarchive/test/test-test_read_format_gtar_filename.$(OBJEXT) \
        libarchive/test/test-test_read_format_gtar_gz.$(OBJEXT) \
        libarchive/test/test-test_read_format_gtar_lzma.$(OBJEXT) \
+       libarchive/test/test-test_read_format_gtar_redundant_L.$(OBJEXT) \
        libarchive/test/test-test_read_format_gtar_sparse.$(OBJEXT) \
        libarchive/test/test-test_read_format_gtar_sparse_length.$(OBJEXT) \
        libarchive/test/test-test_read_format_gtar_sparse_skip_entry.$(OBJEXT) \
@@ -1432,6 +1442,7 @@ am_libarchive_test_OBJECTS = $(am__objec
        libarchive/test/test-test_read_format_rar_encryption_header.$(OBJEXT) \
        libarchive/test/test-test_read_format_rar_filter.$(OBJEXT) \
        libarchive/test/test-test_read_format_rar_invalid1.$(OBJEXT) \
+       libarchive/test/test-test_read_format_rar_overflow.$(OBJEXT) \
        libarchive/test/test-test_read_format_rar5.$(OBJEXT) \
        libarchive/test/test-test_read_format_raw.$(OBJEXT) \
        libarchive/test/test-test_read_format_tar.$(OBJEXT) \
@@ -1441,6 +1452,7 @@ am_libarchive_test_OBJECTS = $(am__objec
        libarchive/test/test-test_read_format_tar_empty_with_gnulabel.$(OBJEXT) \
        libarchive/test/test-test_read_format_tar_filename.$(OBJEXT) \
        libarchive/test/test-test_read_format_tar_invalid_pax_size.$(OBJEXT) \
+       libarchive/test/test-test_read_format_tar_pax_g_large.$(OBJEXT) \
        libarchive/test/test-test_read_format_tar_pax_large_attr.$(OBJEXT) \
        libarchive/test/test-test_read_format_tbz.$(OBJEXT) \
        libarchive/test/test-test_read_format_tgz.$(OBJEXT) \
@@ -1542,6 +1554,7 @@ am_libarchive_test_OBJECTS = $(am__objec
        libarchive/test/test-test_write_format_mtree_classic_indent.$(OBJEXT) \
        libarchive/test/test-test_write_format_mtree_fflags.$(OBJEXT) \
        libarchive/test/test-test_write_format_mtree_no_separator.$(OBJEXT) \
+       libarchive/test/test-test_write_format_mtree_preset_digests.$(OBJEXT) \
        libarchive/test/test-test_write_format_mtree_quoted_filename.$(OBJEXT) \
        libarchive/test/test-test_write_format_pax.$(OBJEXT) \
        libarchive/test/test-test_write_format_raw.$(OBJEXT) \
@@ -1559,6 +1572,9 @@ am_libarchive_test_OBJECTS = $(am__objec
        libarchive/test/test-test_write_format_zip.$(OBJEXT) \
        libarchive/test/test-test_write_format_zip64_stream.$(OBJEXT) \
        libarchive/test/test-test_write_format_zip_compression_store.$(OBJEXT) \
+       libarchive/test/test-test_write_format_zip_compression_zstd.$(OBJEXT) \
+       libarchive/test/test-test_write_format_zip_compression_bzip2.$(OBJEXT) \
+       libarchive/test/test-test_write_format_zip_compression_lzmaxz.$(OBJEXT) \
        libarchive/test/test-test_write_format_zip_empty.$(OBJEXT) \
        libarchive/test/test-test_write_format_zip_empty_zip64.$(OBJEXT) \
        libarchive/test/test-test_write_format_zip_entry_size_unset.$(OBJEXT) \
@@ -1681,11 +1697,11 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/$(DEPDIR)/archive_entry_stat.Plo \
        libarchive/$(DEPDIR)/archive_entry_strmode.Plo \
        libarchive/$(DEPDIR)/archive_entry_xattr.Plo \
-       libarchive/$(DEPDIR)/archive_getdate.Plo \
        libarchive/$(DEPDIR)/archive_hmac.Plo \
        libarchive/$(DEPDIR)/archive_match.Plo \
        libarchive/$(DEPDIR)/archive_options.Plo \
        libarchive/$(DEPDIR)/archive_pack_dev.Plo \
+       libarchive/$(DEPDIR)/archive_parse_date.Plo \
        libarchive/$(DEPDIR)/archive_pathmatch.Plo \
        libarchive/$(DEPDIR)/archive_ppmd7.Plo \
        libarchive/$(DEPDIR)/archive_ppmd8.Plo \
@@ -1741,6 +1757,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/$(DEPDIR)/archive_read_support_format_zip.Plo \
        libarchive/$(DEPDIR)/archive_string.Plo \
        libarchive/$(DEPDIR)/archive_string_sprintf.Plo \
+       libarchive/$(DEPDIR)/archive_time.Plo \
        libarchive/$(DEPDIR)/archive_util.Plo \
        libarchive/$(DEPDIR)/archive_version_details.Plo \
        libarchive/$(DEPDIR)/archive_virtual.Plo \
@@ -1811,11 +1828,11 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/$(DEPDIR)/test-archive_entry_stat.Po \
        libarchive/$(DEPDIR)/test-archive_entry_strmode.Po \
        libarchive/$(DEPDIR)/test-archive_entry_xattr.Po \
-       libarchive/$(DEPDIR)/test-archive_getdate.Po \
        libarchive/$(DEPDIR)/test-archive_hmac.Po \
        libarchive/$(DEPDIR)/test-archive_match.Po \
        libarchive/$(DEPDIR)/test-archive_options.Po \
        libarchive/$(DEPDIR)/test-archive_pack_dev.Po \
+       libarchive/$(DEPDIR)/test-archive_parse_date.Po \
        libarchive/$(DEPDIR)/test-archive_pathmatch.Po \
        libarchive/$(DEPDIR)/test-archive_ppmd7.Po \
        libarchive/$(DEPDIR)/test-archive_ppmd8.Po \
@@ -1871,6 +1888,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/$(DEPDIR)/test-archive_read_support_format_zip.Po \
        libarchive/$(DEPDIR)/test-archive_string.Po \
        libarchive/$(DEPDIR)/test-archive_string_sprintf.Po \
+       libarchive/$(DEPDIR)/test-archive_time.Po \
        libarchive/$(DEPDIR)/test-archive_util.Po \
        libarchive/$(DEPDIR)/test-archive_version_details.Po \
        libarchive/$(DEPDIR)/test-archive_virtual.Po \
@@ -1937,10 +1955,10 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/test/$(DEPDIR)/test-test_archive_clear_error.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_cmdline.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_digest.Po \
-       libarchive/test/$(DEPDIR)/test-test_archive_getdate.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_match_owner.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_match_path.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_match_time.Po \
+       libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_pathmatch.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_read.Po \
        libarchive/test/$(DEPDIR)/test-test_archive_read_add_passphrase.Po \
@@ -2049,6 +2067,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/test/$(DEPDIR)/test-test_read_format_gtar_filename.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_gtar_gz.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_gtar_lzma.Po \
+       libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_length.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_skip_entry.Po \
@@ -2080,6 +2099,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/test/$(DEPDIR)/test-test_read_format_rar_encryption_partially.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_rar_filter.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_rar_invalid1.Po \
+       libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_raw.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_tar.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_tar_concatenated.Po \
@@ -2088,6 +2108,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/test/$(DEPDIR)/test-test_read_format_tar_empty_with_gnulabel.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_tar_filename.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_tar_invalid_pax_size.Po \
+       libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_large_attr.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_tbz.Po \
        libarchive/test/$(DEPDIR)/test-test_read_format_tgz.Po \
@@ -2189,6 +2210,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/test/$(DEPDIR)/test-test_write_format_mtree_classic_indent.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_mtree_fflags.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_mtree_no_separator.Po \
+       libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_mtree_quoted_filename.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_pax.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_raw.Po \
@@ -2205,7 +2227,10 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        libarchive/test/$(DEPDIR)/test-test_write_format_xar_empty.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_zip.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_zip64_stream.Po \
+       libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Po \
+       libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_store.Po \
+       libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty_zip64.Po \
        libarchive/test/$(DEPDIR)/test-test_write_format_zip_entry_size_unset.Po \
@@ -2275,6 +2300,7 @@ am__depfiles_remade = cat/$(DEPDIR)/bsdc
        tar/test/$(DEPDIR)/bsdtar_test-test_option_lz4.Po \
        tar/test/$(DEPDIR)/bsdtar_test-test_option_lzma.Po \
        tar/test/$(DEPDIR)/bsdtar_test-test_option_lzop.Po \
+       tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Po \
        tar/test/$(DEPDIR)/bsdtar_test-test_option_n.Po \
        tar/test/$(DEPDIR)/bsdtar_test-test_option_newer_than.Po \
        tar/test/$(DEPDIR)/bsdtar_test-test_option_nodump.Po \
@@ -2642,6 +2668,8 @@ EXEEXT = @EXEEXT@
 FGREP = @FGREP@
 FILECMD = @FILECMD@
 GREP = @GREP@
+ICONV_PC_CFLAGS = @ICONV_PC_CFLAGS@
+ICONV_PC_LIBS = @ICONV_PC_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -2824,16 +2852,15 @@ libarchive_la_SOURCES = libarchive/archi
        libarchive/archive_entry_sparse.c \
        libarchive/archive_entry_stat.c \
        libarchive/archive_entry_strmode.c \
-       libarchive/archive_entry_xattr.c libarchive/archive_getdate.c \
-       libarchive/archive_getdate.h libarchive/archive_hmac.c \
+       libarchive/archive_entry_xattr.c libarchive/archive_hmac.c \
        libarchive/archive_hmac_private.h libarchive/archive_match.c \
        libarchive/archive_openssl_evp_private.h \
        libarchive/archive_openssl_hmac_private.h \
        libarchive/archive_options.c \
        libarchive/archive_options_private.h \
        libarchive/archive_pack_dev.h libarchive/archive_pack_dev.c \
-       libarchive/archive_pathmatch.c libarchive/archive_pathmatch.h \
-       libarchive/archive_platform.h \
+       libarchive/archive_parse_date.c libarchive/archive_pathmatch.c \
+       libarchive/archive_pathmatch.h libarchive/archive_platform.h \
        libarchive/archive_platform_acl.h \
        libarchive/archive_platform_xattr.h \
        libarchive/archive_ppmd_private.h libarchive/archive_ppmd7.c \
@@ -2892,7 +2919,8 @@ libarchive_la_SOURCES = libarchive/archi
        libarchive/archive_read_support_format_zip.c \
        libarchive/archive_string.c libarchive/archive_string.h \
        libarchive/archive_string_composition.h \
-       libarchive/archive_string_sprintf.c libarchive/archive_util.c \
+       libarchive/archive_string_sprintf.c libarchive/archive_time.c \
+       libarchive/archive_time_private.h libarchive/archive_util.c \
        libarchive/archive_version_details.c \
        libarchive/archive_virtual.c libarchive/archive_write.c \
        libarchive/archive_write_disk_posix.c \
@@ -3040,10 +3068,10 @@ libarchive_test_SOURCES = \
        libarchive/test/test_archive_clear_error.c \
        libarchive/test/test_archive_cmdline.c \
        libarchive/test/test_archive_digest.c \
-       libarchive/test/test_archive_getdate.c \
        libarchive/test/test_archive_match_owner.c \
        libarchive/test/test_archive_match_path.c \
        libarchive/test/test_archive_match_time.c \
+       libarchive/test/test_archive_parse_date.c \
        libarchive/test/test_archive_pathmatch.c \
        libarchive/test/test_archive_read.c \
        libarchive/test/test_archive_read_add_passphrase.c \
@@ -3152,6 +3180,7 @@ libarchive_test_SOURCES = \
        libarchive/test/test_read_format_gtar_filename.c \
        libarchive/test/test_read_format_gtar_gz.c \
        libarchive/test/test_read_format_gtar_lzma.c \
+       libarchive/test/test_read_format_gtar_redundant_L.c \
        libarchive/test/test_read_format_gtar_sparse.c \
        libarchive/test/test_read_format_gtar_sparse_length.c \
        libarchive/test/test_read_format_gtar_sparse_skip_entry.c \
@@ -3182,6 +3211,7 @@ libarchive_test_SOURCES = \
        libarchive/test/test_read_format_rar_encryption_header.c \
        libarchive/test/test_read_format_rar_filter.c \
        libarchive/test/test_read_format_rar_invalid1.c \
+       libarchive/test/test_read_format_rar_overflow.c \
        libarchive/test/test_read_format_rar5.c \
        libarchive/test/test_read_format_raw.c \
        libarchive/test/test_read_format_tar.c \
@@ -3191,6 +3221,7 @@ libarchive_test_SOURCES = \
        libarchive/test/test_read_format_tar_empty_with_gnulabel.c \
        libarchive/test/test_read_format_tar_filename.c \
        libarchive/test/test_read_format_tar_invalid_pax_size.c \
+       libarchive/test/test_read_format_tar_pax_g_large.c \
        libarchive/test/test_read_format_tar_pax_large_attr.c \
        libarchive/test/test_read_format_tbz.c \
        libarchive/test/test_read_format_tgz.c \
@@ -3292,6 +3323,7 @@ libarchive_test_SOURCES = \
        libarchive/test/test_write_format_mtree_classic_indent.c\
        libarchive/test/test_write_format_mtree_fflags.c \
        libarchive/test/test_write_format_mtree_no_separator.c \
+       libarchive/test/test_write_format_mtree_preset_digests.c \
        libarchive/test/test_write_format_mtree_quoted_filename.c\
        libarchive/test/test_write_format_pax.c \
        libarchive/test/test_write_format_raw.c \
@@ -3309,6 +3341,9 @@ libarchive_test_SOURCES = \
        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_compression_zstd.c \
+       libarchive/test/test_write_format_zip_compression_bzip2.c \
+       libarchive/test/test_write_format_zip_compression_lzmaxz.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 \
@@ -3460,11 +3495,16 @@ libarchive_test_EXTRA_DIST = \
        libarchive/test/test_read_format_7zip_lzma2.7z.uu \
        libarchive/test/test_read_format_7zip_lzma2_arm64.7z.uu \
        libarchive/test/test_read_format_7zip_lzma2_arm.7z.uu \
+       libarchive/test/test_read_format_7zip_lzma2_powerpc.7z.uu \
+       libarchive/test/test_read_format_7zip_lzma2_riscv.7z.uu \
        libarchive/test/test_read_format_7zip_lzma2_sparc.7z.uu \
        libarchive/test/test_read_format_7zip_malformed.7z.uu \
        libarchive/test/test_read_format_7zip_malformed2.7z.uu \
        libarchive/test/test_read_format_7zip_packinfo_digests.7z.uu \
        libarchive/test/test_read_format_7zip_ppmd.7z.uu \
+       libarchive/test/test_read_format_7zip_sfx_elf.elf.uu \
+       libarchive/test/test_read_format_7zip_sfx_modified_pe.exe.uu \
+       libarchive/test/test_read_format_7zip_sfx_pe.exe.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 \
@@ -3490,6 +3530,7 @@ libarchive_test_EXTRA_DIST = \
        libarchive/test/test_read_format_gtar_filename_cp866.tar.Z.uu \
        libarchive/test/test_read_format_gtar_filename_eucjp.tar.Z.uu \
        libarchive/test/test_read_format_gtar_filename_koi8r.tar.Z.uu \
+       libarchive/test/test_read_format_gtar_redundant_L.tar.Z.uu \
        libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu \
        libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu \
        libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu \
@@ -3535,6 +3576,7 @@ libarchive_test_EXTRA_DIST = \
        libarchive/test/test_read_format_rar_encryption_data.rar.uu \
        libarchive/test/test_read_format_rar_encryption_header.rar.uu \
        libarchive/test/test_read_format_rar_encryption_partially.rar.uu \
+       libarchive/test/test_read_format_rar_endarc_huge.rar.uu \
        libarchive/test/test_read_format_rar_filter.rar.uu \
        libarchive/test/test_read_format_rar_invalid1.rar.uu \
        libarchive/test/test_read_format_rar_multi_lzss_blocks.rar.uu \
@@ -3542,12 +3584,15 @@ libarchive_test_EXTRA_DIST = \
        libarchive/test/test_read_format_rar_multivolume.part0002.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0003.rar.uu \
        libarchive/test/test_read_format_rar_multivolume.part0004.rar.uu \
+       libarchive/test/test_read_format_rar_newsub_huge.rar.uu \
        libarchive/test/test_read_format_rar_noeof.rar.uu \
+       libarchive/test/test_read_format_rar_overflow.rar.uu \
        libarchive/test/test_read_format_rar_ppmd_lzss_conversion.rar.uu \
        libarchive/test/test_read_format_rar_ppmd_use_after_free.rar.uu \
        libarchive/test/test_read_format_rar_ppmd_use_after_free2.rar.uu \
        libarchive/test/test_read_format_rar_sfx.exe.uu \
        libarchive/test/test_read_format_rar_subblock.rar.uu \
+       libarchive/test/test_read_format_rar_symlink_huge.rar.uu \
        libarchive/test/test_read_format_rar_unicode.rar.uu \
        libarchive/test/test_read_format_rar_windows.rar.uu \
        libarchive/test/test_read_format_rar4_encrypted.rar.uu \
@@ -3611,11 +3656,13 @@ libarchive_test_EXTRA_DIST = \
        libarchive/test/test_read_format_tar_empty_pax.tar.Z.uu \
        libarchive/test/test_read_format_tar_filename_koi8r.tar.Z.uu \
        libarchive/test/test_read_format_tar_invalid_pax_size.tar.uu \
+       libarchive/test/test_read_format_tar_pax_g_large.tar.uu \
        libarchive/test/test_read_format_tar_pax_large_attr.tar.Z.uu \
        libarchive/test/test_read_format_ustar_filename_cp866.tar.Z.uu \
        libarchive/test/test_read_format_ustar_filename_eucjp.tar.Z.uu \
        libarchive/test/test_read_format_ustar_filename_koi8r.tar.Z.uu \
        libarchive/test/test_read_format_warc.warc.uu \
+       libarchive/test/test_read_format_warc_incomplete.warc.uu \
        libarchive/test/test_read_format_xar_doublelink.xar.uu \
        libarchive/test/test_read_format_xar_duplicate_filename_node.xar.uu \
        libarchive/test/test_read_format_zip.zip.uu \
@@ -3787,6 +3834,7 @@ bsdtar_test_SOURCES = \
        tar/test/test_option_lz4.c \
        tar/test/test_option_lzma.c \
        tar/test/test_option_lzop.c \
+       tar/test/test_option_mtime.c \
        tar/test/test_option_n.c \
        tar/test/test_option_newer_than.c \
        tar/test/test_option_nodump.c \
@@ -4319,8 +4367,6 @@ libarchive/archive_entry_strmode.lo: lib
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_entry_xattr.lo: libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/archive_getdate.lo: libarchive/$(am__dirstamp) \
-       libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_hmac.lo: libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_match.lo: libarchive/$(am__dirstamp) \
@@ -4329,6 +4375,8 @@ libarchive/archive_options.lo: libarchiv
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_pack_dev.lo: libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/archive_parse_date.lo: libarchive/$(am__dirstamp) \
+       libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_pathmatch.lo: libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_ppmd7.lo: libarchive/$(am__dirstamp) \
@@ -4471,6 +4519,8 @@ libarchive/archive_string.lo: libarchive
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_string_sprintf.lo: libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/archive_time.lo: libarchive/$(am__dirstamp) \
+       libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_util.lo: libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/archive_version_details.lo: libarchive/$(am__dirstamp) \
@@ -4978,6 +5028,8 @@ tar/test/bsdtar_test-test_option_lzma.$(
        tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
 tar/test/bsdtar_test-test_option_lzop.$(OBJEXT):  \
        tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
+tar/test/bsdtar_test-test_option_mtime.$(OBJEXT):  \
+       tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
 tar/test/bsdtar_test-test_option_n.$(OBJEXT):  \
        tar/test/$(am__dirstamp) tar/test/$(DEPDIR)/$(am__dirstamp)
 tar/test/bsdtar_test-test_option_newer_than.$(OBJEXT):  \
@@ -5142,8 +5194,6 @@ libarchive/test-archive_entry_strmode.$(
 libarchive/test-archive_entry_xattr.$(OBJEXT):  \
        libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
-libarchive/test-archive_getdate.$(OBJEXT): libarchive/$(am__dirstamp) \
-       libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/test-archive_hmac.$(OBJEXT): libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/test-archive_match.$(OBJEXT): libarchive/$(am__dirstamp) \
@@ -5153,6 +5203,9 @@ libarchive/test-archive_options.$(OBJEXT
 libarchive/test-archive_pack_dev.$(OBJEXT):  \
        libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/test-archive_parse_date.$(OBJEXT):  \
+       libarchive/$(am__dirstamp) \
+       libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/test-archive_pathmatch.$(OBJEXT):  \
        libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
@@ -5309,6 +5362,8 @@ libarchive/test-archive_string.$(OBJEXT)
 libarchive/test-archive_string_sprintf.$(OBJEXT):  \
        libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
+libarchive/test-archive_time.$(OBJEXT): libarchive/$(am__dirstamp) \
+       libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/test-archive_util.$(OBJEXT): libarchive/$(am__dirstamp) \
        libarchive/$(DEPDIR)/$(am__dirstamp)
 libarchive/test-archive_version_details.$(OBJEXT):  \
@@ -5535,9 +5590,6 @@ libarchive/test/test-test_archive_cmdlin
 libarchive/test/test-test_archive_digest.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
-libarchive/test/test-test_archive_getdate.$(OBJEXT):  \
-       libarchive/test/$(am__dirstamp) \
-       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/test-test_archive_match_owner.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -5547,6 +5599,9 @@ libarchive/test/test-test_archive_match_
 libarchive/test/test-test_archive_match_time.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_archive_parse_date.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/test-test_archive_pathmatch.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -5871,6 +5926,9 @@ libarchive/test/test-test_read_format_gt
 libarchive/test/test-test_read_format_gtar_lzma.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_read_format_gtar_redundant_L.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/test-test_read_format_gtar_sparse.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -5961,6 +6019,9 @@ libarchive/test/test-test_read_format_ra
 libarchive/test/test-test_read_format_rar_invalid1.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_read_format_rar_overflow.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/test-test_read_format_rar5.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -5988,6 +6049,9 @@ libarchive/test/test-test_read_format_ta
 libarchive/test/test-test_read_format_tar_invalid_pax_size.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_read_format_tar_pax_g_large.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/test-test_read_format_tar_pax_large_attr.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -6291,6 +6355,9 @@ libarchive/test/test-test_write_format_m
 libarchive/test/test-test_write_format_mtree_no_separator.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_write_format_mtree_preset_digests.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/test-test_write_format_mtree_quoted_filename.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -6342,6 +6409,15 @@ libarchive/test/test-test_write_format_z
 libarchive/test/test-test_write_format_zip_compression_store.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_write_format_zip_compression_zstd.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_write_format_zip_compression_bzip2.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
+libarchive/test/test-test_write_format_zip_compression_lzmaxz.$(OBJEXT):  \
+       libarchive/test/$(am__dirstamp) \
+       libarchive/test/$(DEPDIR)/$(am__dirstamp)
 libarchive/test/test-test_write_format_zip_empty.$(OBJEXT):  \
        libarchive/test/$(am__dirstamp) \
        libarchive/test/$(DEPDIR)/$(am__dirstamp)
@@ -6498,11 +6574,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_stat.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_strmode.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_entry_xattr.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_getdate.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_hmac.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_match.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_options.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_pack_dev.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_parse_date.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_pathmatch.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_ppmd7.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_ppmd8.Plo@am__quote@ # am--include-marker
@@ -6558,6 +6634,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_read_support_format_zip.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_string.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_string_sprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_time.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_util.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_version_details.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/archive_virtual.Plo@am__quote@ # am--include-marker
@@ -6628,11 +6705,11 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_entry_stat.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_entry_strmode.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_entry_xattr.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_getdate.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_hmac.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_match.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_options.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_pack_dev.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_parse_date.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_pathmatch.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_ppmd7.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_ppmd8.Po@am__quote@ # am--include-marker
@@ -6688,6 +6765,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_read_support_format_zip.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_string.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_string_sprintf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_time.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_util.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_version_details.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/$(DEPDIR)/test-archive_virtual.Po@am__quote@ # am--include-marker
@@ -6754,10 +6832,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_clear_error.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_cmdline.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_digest.Po@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_getdate.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_match_owner.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_match_path.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_match_time.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_pathmatch.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_read.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_archive_read_add_passphrase.Po@am__quote@ # am--include-marker
@@ -6866,6 +6944,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_gtar_filename.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_gtar_gz.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_gtar_lzma.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_length.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_skip_entry.Po@am__quote@ # am--include-marker
@@ -6897,6 +6976,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_rar_encryption_partially.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_rar_filter.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_rar_invalid1.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_raw.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tar.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tar_concatenated.Po@am__quote@ # am--include-marker
@@ -6905,6 +6985,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tar_empty_with_gnulabel.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tar_filename.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tar_invalid_pax_size.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_large_attr.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tbz.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_read_format_tgz.Po@am__quote@ # am--include-marker
@@ -7006,6 +7087,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_mtree_classic_indent.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_mtree_fflags.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_mtree_no_separator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_mtree_quoted_filename.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_pax.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_raw.Po@am__quote@ # am--include-marker
@@ -7022,7 +7104,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_xar_empty.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip64_stream.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_store.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty_zip64.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@libarchive/test/$(DEPDIR)/test-test_write_format_zip_entry_size_unset.Po@am__quote@ # am--include-marker
@@ -7094,6 +7179,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_lz4.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_lzma.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_lzop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_n.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_newer_than.Po@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@tar/test/$(DEPDIR)/bsdtar_test-test_option_nodump.Po@am__quote@ # am--include-marker
@@ -9079,6 +9165,20 @@ tar/test/bsdtar_test-test_option_lzop.ob
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_lzop.obj 
`if test -f 'tar/test/test_option_lzop.c'; then $(CYGPATH_W) 'tar/test/test_option_lzop.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_lzop.c'; fi`
 
+tar/test/bsdtar_test-test_option_mtime.o: tar/test/test_option_mtime.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_mtime.o -MD -MP -MF 
tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Tpo -c -o tar/test/bsdtar_test-test_option_mtime.o `test -f 'tar/test/test_option_mtime.c' || echo '$(srcdir)/'`tar/test/test_option_mtime.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tar/test/test_option_mtime.c' object='tar/test/bsdtar_test-test_option_mtime.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_mtime.o 
`test -f 'tar/test/test_option_mtime.c' || echo '$(srcdir)/'`tar/test/test_option_mtime.c
+
+tar/test/bsdtar_test-test_option_mtime.obj: tar/test/test_option_mtime.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_mtime.obj -MD -MP -MF 
tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Tpo -c -o tar/test/bsdtar_test-test_option_mtime.obj `if test -f 'tar/test/test_option_mtime.c'; then $(CYGPATH_W) 'tar/test/test_option_mtime.c'; 
else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_mtime.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tar/test/test_option_mtime.c' object='tar/test/bsdtar_test-test_option_mtime.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tar/test/bsdtar_test-test_option_mtime.obj 
`if test -f 'tar/test/test_option_mtime.c'; then $(CYGPATH_W) 'tar/test/test_option_mtime.c'; else $(CYGPATH_W) '$(srcdir)/tar/test/test_option_mtime.c'; fi`
+
 tar/test/bsdtar_test-test_option_n.o: tar/test/test_option_n.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bsdtar_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tar/test/bsdtar_test-test_option_n.o -MD -MP -MF 
tar/test/$(DEPDIR)/bsdtar_test-test_option_n.Tpo -c -o tar/test/bsdtar_test-test_option_n.o `test -f 'tar/test/test_option_n.c' || echo '$(srcdir)/'`tar/test/test_option_n.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tar/test/$(DEPDIR)/bsdtar_test-test_option_n.Tpo tar/test/$(DEPDIR)/bsdtar_test-test_option_n.Po
@@ -9933,20 +10033,6 @@ libarchive/test-archive_entry_xattr.obj:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_entry_xattr.obj 
`if test -f 'libarchive/archive_entry_xattr.c'; then $(CYGPATH_W) 'libarchive/archive_entry_xattr.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_entry_xattr.c'; fi`
 
-libarchive/test-archive_getdate.o: libarchive/archive_getdate.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_getdate.o -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_getdate.Tpo -c -o libarchive/test-archive_getdate.o `test -f 'libarchive/archive_getdate.c' || echo '$(srcdir)/'`libarchive/archive_getdate.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_getdate.Tpo libarchive/$(DEPDIR)/test-archive_getdate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/archive_getdate.c' object='libarchive/test-archive_getdate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_getdate.o `test 
-f 'libarchive/archive_getdate.c' || echo '$(srcdir)/'`libarchive/archive_getdate.c
-
-libarchive/test-archive_getdate.obj: libarchive/archive_getdate.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_getdate.obj -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_getdate.Tpo -c -o libarchive/test-archive_getdate.obj `if test -f 'libarchive/archive_getdate.c'; then $(CYGPATH_W) 'libarchive/archive_getdate.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/archive_getdate.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_getdate.Tpo libarchive/$(DEPDIR)/test-archive_getdate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/archive_getdate.c' object='libarchive/test-archive_getdate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_getdate.obj `if 
test -f 'libarchive/archive_getdate.c'; then $(CYGPATH_W) 'libarchive/archive_getdate.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_getdate.c'; fi`
-
 libarchive/test-archive_hmac.o: libarchive/archive_hmac.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_hmac.o -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_hmac.Tpo -c -o libarchive/test-archive_hmac.o `test -f 'libarchive/archive_hmac.c' || echo '$(srcdir)/'`libarchive/archive_hmac.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_hmac.Tpo libarchive/$(DEPDIR)/test-archive_hmac.Po
@@ -10003,6 +10089,20 @@ libarchive/test-archive_pack_dev.obj: li
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_pack_dev.obj 
`if test -f 'libarchive/archive_pack_dev.c'; then $(CYGPATH_W) 'libarchive/archive_pack_dev.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_pack_dev.c'; fi`
 
+libarchive/test-archive_parse_date.o: libarchive/archive_parse_date.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_parse_date.o -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_parse_date.Tpo -c -o libarchive/test-archive_parse_date.o `test -f 'libarchive/archive_parse_date.c' || echo '$(srcdir)/'`libarchive/archive_parse_date.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_parse_date.Tpo libarchive/$(DEPDIR)/test-archive_parse_date.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/archive_parse_date.c' object='libarchive/test-archive_parse_date.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_parse_date.o 
`test -f 'libarchive/archive_parse_date.c' || echo '$(srcdir)/'`libarchive/archive_parse_date.c
+
+libarchive/test-archive_parse_date.obj: libarchive/archive_parse_date.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_parse_date.obj -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_parse_date.Tpo -c -o libarchive/test-archive_parse_date.obj `if test -f 'libarchive/archive_parse_date.c'; then $(CYGPATH_W) 'libarchive/archive_parse_date.c'; else 
$(CYGPATH_W) '$(srcdir)/libarchive/archive_parse_date.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_parse_date.Tpo libarchive/$(DEPDIR)/test-archive_parse_date.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/archive_parse_date.c' object='libarchive/test-archive_parse_date.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_parse_date.obj 
`if test -f 'libarchive/archive_parse_date.c'; then $(CYGPATH_W) 'libarchive/archive_parse_date.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_parse_date.c'; fi`
+
 libarchive/test-archive_pathmatch.o: libarchive/archive_pathmatch.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_pathmatch.o -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_pathmatch.Tpo -c -o libarchive/test-archive_pathmatch.o `test -f 'libarchive/archive_pathmatch.c' || echo '$(srcdir)/'`libarchive/archive_pathmatch.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_pathmatch.Tpo libarchive/$(DEPDIR)/test-archive_pathmatch.Po
@@ -10759,6 +10859,20 @@ libarchive/test-archive_string_sprintf.o
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test-archive_string_sprintf.obj `if test -f 'libarchive/archive_string_sprintf.c'; then $(CYGPATH_W) 'libarchive/archive_string_sprintf.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/archive_string_sprintf.c'; fi`
 
+libarchive/test-archive_time.o: libarchive/archive_time.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_time.o -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_time.Tpo -c -o libarchive/test-archive_time.o `test -f 'libarchive/archive_time.c' || echo '$(srcdir)/'`libarchive/archive_time.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_time.Tpo libarchive/$(DEPDIR)/test-archive_time.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/archive_time.c' object='libarchive/test-archive_time.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_time.o `test -f 
'libarchive/archive_time.c' || echo '$(srcdir)/'`libarchive/archive_time.c
+
+libarchive/test-archive_time.obj: libarchive/archive_time.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_time.obj -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_time.Tpo -c -o libarchive/test-archive_time.obj `if test -f 'libarchive/archive_time.c'; then $(CYGPATH_W) 'libarchive/archive_time.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/archive_time.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_time.Tpo libarchive/$(DEPDIR)/test-archive_time.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/archive_time.c' object='libarchive/test-archive_time.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libarchive/test-archive_time.obj `if 
test -f 'libarchive/archive_time.c'; then $(CYGPATH_W) 'libarchive/archive_time.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/archive_time.c'; fi`
+
 libarchive/test-archive_util.o: libarchive/archive_util.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test-archive_util.o -MD -MP -MF 
libarchive/$(DEPDIR)/test-archive_util.Tpo -c -o libarchive/test-archive_util.o `test -f 'libarchive/archive_util.c' || echo '$(srcdir)/'`libarchive/archive_util.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/$(DEPDIR)/test-archive_util.Tpo libarchive/$(DEPDIR)/test-archive_util.Po
@@ -11809,20 +11923,6 @@ libarchive/test/test-test_archive_digest
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_archive_digest.obj `if test -f 'libarchive/test/test_archive_digest.c'; then $(CYGPATH_W) 'libarchive/test/test_archive_digest.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/test/test_archive_digest.c'; fi`
 
-libarchive/test/test-test_archive_getdate.o: libarchive/test/test_archive_getdate.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_archive_getdate.o -MD -MP 
-MF libarchive/test/$(DEPDIR)/test-test_archive_getdate.Tpo -c -o libarchive/test/test-test_archive_getdate.o `test -f 'libarchive/test/test_archive_getdate.c' || echo 
'$(srcdir)/'`libarchive/test/test_archive_getdate.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_archive_getdate.Tpo libarchive/test/$(DEPDIR)/test-test_archive_getdate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_archive_getdate.c' object='libarchive/test/test-test_archive_getdate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_archive_getdate.o `test -f 'libarchive/test/test_archive_getdate.c' || echo '$(srcdir)/'`libarchive/test/test_archive_getdate.c
-
-libarchive/test/test-test_archive_getdate.obj: libarchive/test/test_archive_getdate.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_archive_getdate.obj -MD 
-MP -MF libarchive/test/$(DEPDIR)/test-test_archive_getdate.Tpo -c -o libarchive/test/test-test_archive_getdate.obj `if test -f 'libarchive/test/test_archive_getdate.c'; then $(CYGPATH_W) 
'libarchive/test/test_archive_getdate.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_archive_getdate.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_archive_getdate.Tpo libarchive/test/$(DEPDIR)/test-test_archive_getdate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_archive_getdate.c' object='libarchive/test/test-test_archive_getdate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_archive_getdate.obj `if test -f 'libarchive/test/test_archive_getdate.c'; then $(CYGPATH_W) 'libarchive/test/test_archive_getdate.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/test/test_archive_getdate.c'; fi`
-
 libarchive/test/test-test_archive_match_owner.o: libarchive/test/test_archive_match_owner.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_archive_match_owner.o -MD 
-MP -MF libarchive/test/$(DEPDIR)/test-test_archive_match_owner.Tpo -c -o libarchive/test/test-test_archive_match_owner.o `test -f 'libarchive/test/test_archive_match_owner.c' || echo 
'$(srcdir)/'`libarchive/test/test_archive_match_owner.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_archive_match_owner.Tpo libarchive/test/$(DEPDIR)/test-test_archive_match_owner.Po
@@ -11865,6 +11965,20 @@ libarchive/test/test-test_archive_match_
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_archive_match_time.obj `if test -f 'libarchive/test/test_archive_match_time.c'; then $(CYGPATH_W) 'libarchive/test/test_archive_match_time.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/test/test_archive_match_time.c'; fi`
 
+libarchive/test/test-test_archive_parse_date.o: libarchive/test/test_archive_parse_date.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_archive_parse_date.o -MD 
-MP -MF libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Tpo -c -o libarchive/test/test-test_archive_parse_date.o `test -f 'libarchive/test/test_archive_parse_date.c' || echo 
'$(srcdir)/'`libarchive/test/test_archive_parse_date.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Tpo libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_archive_parse_date.c' object='libarchive/test/test-test_archive_parse_date.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_archive_parse_date.o `test -f 'libarchive/test/test_archive_parse_date.c' || echo '$(srcdir)/'`libarchive/test/test_archive_parse_date.c
+
+libarchive/test/test-test_archive_parse_date.obj: libarchive/test/test_archive_parse_date.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_archive_parse_date.obj -MD 
-MP -MF libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Tpo -c -o libarchive/test/test-test_archive_parse_date.obj `if test -f 'libarchive/test/test_archive_parse_date.c'; then $(CYGPATH_W) 
'libarchive/test/test_archive_parse_date.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_archive_parse_date.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Tpo libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_archive_parse_date.c' object='libarchive/test/test-test_archive_parse_date.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_archive_parse_date.obj `if test -f 'libarchive/test/test_archive_parse_date.c'; then $(CYGPATH_W) 'libarchive/test/test_archive_parse_date.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/test/test_archive_parse_date.c'; fi`
+
 libarchive/test/test-test_archive_pathmatch.o: libarchive/test/test_archive_pathmatch.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_archive_pathmatch.o -MD 
-MP -MF libarchive/test/$(DEPDIR)/test-test_archive_pathmatch.Tpo -c -o libarchive/test/test-test_archive_pathmatch.o `test -f 'libarchive/test/test_archive_pathmatch.c' || echo 
'$(srcdir)/'`libarchive/test/test_archive_pathmatch.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_archive_pathmatch.Tpo libarchive/test/$(DEPDIR)/test-test_archive_pathmatch.Po
@@ -13377,6 +13491,20 @@ libarchive/test/test-test_read_format_gt
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_gtar_lzma.obj `if test -f 'libarchive/test/test_read_format_gtar_lzma.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_gtar_lzma.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/test/test_read_format_gtar_lzma.c'; fi`
 
+libarchive/test/test-test_read_format_gtar_redundant_L.o: libarchive/test/test_read_format_gtar_redundant_L.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_read_format_gtar_redundant_L.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Tpo -c -o 
libarchive/test/test-test_read_format_gtar_redundant_L.o `test -f 'libarchive/test/test_read_format_gtar_redundant_L.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_gtar_redundant_L.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_gtar_redundant_L.c' object='libarchive/test/test-test_read_format_gtar_redundant_L.o' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_gtar_redundant_L.o `test -f 'libarchive/test/test_read_format_gtar_redundant_L.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_gtar_redundant_L.c
+
+libarchive/test/test-test_read_format_gtar_redundant_L.obj: libarchive/test/test_read_format_gtar_redundant_L.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_read_format_gtar_redundant_L.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Tpo -c -o 
libarchive/test/test-test_read_format_gtar_redundant_L.obj `if test -f 'libarchive/test/test_read_format_gtar_redundant_L.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_gtar_redundant_L.c'; 
else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_gtar_redundant_L.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_gtar_redundant_L.c' object='libarchive/test/test-test_read_format_gtar_redundant_L.obj' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_gtar_redundant_L.obj `if test -f 'libarchive/test/test_read_format_gtar_redundant_L.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_gtar_redundant_L.c'; 
else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_gtar_redundant_L.c'; fi`
+
 libarchive/test/test-test_read_format_gtar_sparse.o: libarchive/test/test_read_format_gtar_sparse.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_gtar_sparse.o 
-MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse.Tpo -c -o libarchive/test/test-test_read_format_gtar_sparse.o `test -f 'libarchive/test/test_read_format_gtar_sparse.c' || echo 
'$(srcdir)/'`libarchive/test/test_read_format_gtar_sparse.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse.Po
@@ -13797,6 +13925,20 @@ libarchive/test/test-test_read_format_ra
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_rar_invalid1.obj `if test -f 'libarchive/test/test_read_format_rar_invalid1.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_rar_invalid1.c'; else 
$(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_rar_invalid1.c'; fi`
 
+libarchive/test/test-test_read_format_rar_overflow.o: libarchive/test/test_read_format_rar_overflow.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_rar_overflow.o 
-MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Tpo -c -o libarchive/test/test-test_read_format_rar_overflow.o `test -f 'libarchive/test/test_read_format_rar_overflow.c' || 
echo '$(srcdir)/'`libarchive/test/test_read_format_rar_overflow.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_rar_overflow.c' object='libarchive/test/test-test_read_format_rar_overflow.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_rar_overflow.o `test -f 'libarchive/test/test_read_format_rar_overflow.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_rar_overflow.c
+
+libarchive/test/test-test_read_format_rar_overflow.obj: libarchive/test/test_read_format_rar_overflow.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_read_format_rar_overflow.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Tpo -c -o libarchive/test/test-test_read_format_rar_overflow.obj `if 
test -f 'libarchive/test/test_read_format_rar_overflow.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_rar_overflow.c'; else $(CYGPATH_W) 
'$(srcdir)/libarchive/test/test_read_format_rar_overflow.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_rar_overflow.c' object='libarchive/test/test-test_read_format_rar_overflow.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_rar_overflow.obj `if test -f 'libarchive/test/test_read_format_rar_overflow.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_rar_overflow.c'; else 
$(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_rar_overflow.c'; fi`
+
 libarchive/test/test-test_read_format_rar5.o: libarchive/test/test_read_format_rar5.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_read_format_rar5.o -MD -MP 
-MF libarchive/test/$(DEPDIR)/test-test_read_format_rar5.Tpo -c -o libarchive/test/test-test_read_format_rar5.o `test -f 'libarchive/test/test_read_format_rar5.c' || echo 
'$(srcdir)/'`libarchive/test/test_read_format_rar5.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_rar5.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_rar5.Po
@@ -13923,6 +14065,20 @@ libarchive/test/test-test_read_format_ta
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_tar_invalid_pax_size.obj `if test -f 'libarchive/test/test_read_format_tar_invalid_pax_size.c'; then $(CYGPATH_W) 
'libarchive/test/test_read_format_tar_invalid_pax_size.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_tar_invalid_pax_size.c'; fi`
 
+libarchive/test/test-test_read_format_tar_pax_g_large.o: libarchive/test/test_read_format_tar_pax_g_large.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_read_format_tar_pax_g_large.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Tpo -c -o libarchive/test/test-test_read_format_tar_pax_g_large.o 
`test -f 'libarchive/test/test_read_format_tar_pax_g_large.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_tar_pax_g_large.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_tar_pax_g_large.c' object='libarchive/test/test-test_read_format_tar_pax_g_large.o' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_tar_pax_g_large.o `test -f 'libarchive/test/test_read_format_tar_pax_g_large.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_tar_pax_g_large.c
+
+libarchive/test/test-test_read_format_tar_pax_g_large.obj: libarchive/test/test_read_format_tar_pax_g_large.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_read_format_tar_pax_g_large.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Tpo -c -o 
libarchive/test/test-test_read_format_tar_pax_g_large.obj `if test -f 'libarchive/test/test_read_format_tar_pax_g_large.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_tar_pax_g_large.c'; 
else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_tar_pax_g_large.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_read_format_tar_pax_g_large.c' object='libarchive/test/test-test_read_format_tar_pax_g_large.obj' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_read_format_tar_pax_g_large.obj `if test -f 'libarchive/test/test_read_format_tar_pax_g_large.c'; then $(CYGPATH_W) 'libarchive/test/test_read_format_tar_pax_g_large.c'; 
else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_read_format_tar_pax_g_large.c'; fi`
+
 libarchive/test/test-test_read_format_tar_pax_large_attr.o: libarchive/test/test_read_format_tar_pax_large_attr.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_read_format_tar_pax_large_attr.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_large_attr.Tpo -c -o 
libarchive/test/test-test_read_format_tar_pax_large_attr.o `test -f 'libarchive/test/test_read_format_tar_pax_large_attr.c' || echo '$(srcdir)/'`libarchive/test/test_read_format_tar_pax_large_attr.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_large_attr.Tpo libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_large_attr.Po
@@ -15337,6 +15493,20 @@ libarchive/test/test-test_write_format_m
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_mtree_no_separator.obj `if test -f 'libarchive/test/test_write_format_mtree_no_separator.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_mtree_no_separator.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_mtree_no_separator.c'; fi`
 
+libarchive/test/test-test_write_format_mtree_preset_digests.o: libarchive/test/test_write_format_mtree_preset_digests.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_mtree_preset_digests.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Tpo -c -o 
libarchive/test/test-test_write_format_mtree_preset_digests.o `test -f 'libarchive/test/test_write_format_mtree_preset_digests.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_mtree_preset_digests.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_mtree_preset_digests.c' object='libarchive/test/test-test_write_format_mtree_preset_digests.o' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_mtree_preset_digests.o `test -f 'libarchive/test/test_write_format_mtree_preset_digests.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_mtree_preset_digests.c
+
+libarchive/test/test-test_write_format_mtree_preset_digests.obj: libarchive/test/test_write_format_mtree_preset_digests.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_mtree_preset_digests.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Tpo -c -o 
libarchive/test/test-test_write_format_mtree_preset_digests.obj `if test -f 'libarchive/test/test_write_format_mtree_preset_digests.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_mtree_preset_digests.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_mtree_preset_digests.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_mtree_preset_digests.c' object='libarchive/test/test-test_write_format_mtree_preset_digests.obj' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_mtree_preset_digests.obj `if test -f 'libarchive/test/test_write_format_mtree_preset_digests.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_mtree_preset_digests.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_mtree_preset_digests.c'; fi`
+
 libarchive/test/test-test_write_format_mtree_quoted_filename.o: libarchive/test/test_write_format_mtree_quoted_filename.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_mtree_quoted_filename.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_mtree_quoted_filename.Tpo -c -o 
libarchive/test/test-test_write_format_mtree_quoted_filename.o `test -f 'libarchive/test/test_write_format_mtree_quoted_filename.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_mtree_quoted_filename.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_mtree_quoted_filename.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_mtree_quoted_filename.Po
@@ -15575,6 +15745,48 @@ libarchive/test/test-test_write_format_z
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_zip_compression_store.obj `if test -f 'libarchive/test/test_write_format_zip_compression_store.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_zip_compression_store.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_zip_compression_store.c'; fi`
 
+libarchive/test/test-test_write_format_zip_compression_zstd.o: libarchive/test/test_write_format_zip_compression_zstd.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_zip_compression_zstd.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Tpo -c -o 
libarchive/test/test-test_write_format_zip_compression_zstd.o `test -f 'libarchive/test/test_write_format_zip_compression_zstd.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_zip_compression_zstd.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_zip_compression_zstd.c' object='libarchive/test/test-test_write_format_zip_compression_zstd.o' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_zip_compression_zstd.o `test -f 'libarchive/test/test_write_format_zip_compression_zstd.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_zip_compression_zstd.c
+
+libarchive/test/test-test_write_format_zip_compression_zstd.obj: libarchive/test/test_write_format_zip_compression_zstd.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_zip_compression_zstd.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Tpo -c -o 
libarchive/test/test-test_write_format_zip_compression_zstd.obj `if test -f 'libarchive/test/test_write_format_zip_compression_zstd.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_zip_compression_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_zip_compression_zstd.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_zip_compression_zstd.c' object='libarchive/test/test-test_write_format_zip_compression_zstd.obj' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_zip_compression_zstd.obj `if test -f 'libarchive/test/test_write_format_zip_compression_zstd.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_zip_compression_zstd.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_zip_compression_zstd.c'; fi`
+
+libarchive/test/test-test_write_format_zip_compression_bzip2.o: libarchive/test/test_write_format_zip_compression_bzip2.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_zip_compression_bzip2.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Tpo -c -o 
libarchive/test/test-test_write_format_zip_compression_bzip2.o `test -f 'libarchive/test/test_write_format_zip_compression_bzip2.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_zip_compression_bzip2.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_zip_compression_bzip2.c' object='libarchive/test/test-test_write_format_zip_compression_bzip2.o' libtool=no 
@AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_zip_compression_bzip2.o `test -f 'libarchive/test/test_write_format_zip_compression_bzip2.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_zip_compression_bzip2.c
+
+libarchive/test/test-test_write_format_zip_compression_bzip2.obj: libarchive/test/test_write_format_zip_compression_bzip2.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_zip_compression_bzip2.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Tpo -c -o 
libarchive/test/test-test_write_format_zip_compression_bzip2.obj `if test -f 'libarchive/test/test_write_format_zip_compression_bzip2.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_zip_compression_bzip2.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_zip_compression_bzip2.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_zip_compression_bzip2.c' object='libarchive/test/test-test_write_format_zip_compression_bzip2.obj' 
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_zip_compression_bzip2.obj `if test -f 'libarchive/test/test_write_format_zip_compression_bzip2.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_zip_compression_bzip2.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_zip_compression_bzip2.c'; fi`
+
+libarchive/test/test-test_write_format_zip_compression_lzmaxz.o: libarchive/test/test_write_format_zip_compression_lzmaxz.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_zip_compression_lzmaxz.o -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Tpo -c -o 
libarchive/test/test-test_write_format_zip_compression_lzmaxz.o `test -f 'libarchive/test/test_write_format_zip_compression_lzmaxz.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_zip_compression_lzmaxz.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_zip_compression_lzmaxz.c' object='libarchive/test/test-test_write_format_zip_compression_lzmaxz.o' 
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_zip_compression_lzmaxz.o `test -f 'libarchive/test/test_write_format_zip_compression_lzmaxz.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_zip_compression_lzmaxz.c
+
+libarchive/test/test-test_write_format_zip_compression_lzmaxz.obj: libarchive/test/test_write_format_zip_compression_lzmaxz.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT 
libarchive/test/test-test_write_format_zip_compression_lzmaxz.obj -MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Tpo -c -o 
libarchive/test/test-test_write_format_zip_compression_lzmaxz.obj `if test -f 'libarchive/test/test_write_format_zip_compression_lzmaxz.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_zip_compression_lzmaxz.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_zip_compression_lzmaxz.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='libarchive/test/test_write_format_zip_compression_lzmaxz.c' object='libarchive/test/test-test_write_format_zip_compression_lzmaxz.obj' 
libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o 
libarchive/test/test-test_write_format_zip_compression_lzmaxz.obj `if test -f 'libarchive/test/test_write_format_zip_compression_lzmaxz.c'; then $(CYGPATH_W) 
'libarchive/test/test_write_format_zip_compression_lzmaxz.c'; else $(CYGPATH_W) '$(srcdir)/libarchive/test/test_write_format_zip_compression_lzmaxz.c'; fi`
+
 libarchive/test/test-test_write_format_zip_empty.o: libarchive/test/test_write_format_zip_empty.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libarchive_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libarchive/test/test-test_write_format_zip_empty.o 
-MD -MP -MF libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty.Tpo -c -o libarchive/test/test-test_write_format_zip_empty.o `test -f 'libarchive/test/test_write_format_zip_empty.c' || echo 
'$(srcdir)/'`libarchive/test/test_write_format_zip_empty.c
 @am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty.Tpo libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty.Po
@@ -16537,11 +16749,11 @@ distclean: distclean-am
        -rm -f libarchive/$(DEPDIR)/archive_entry_stat.Plo
        -rm -f libarchive/$(DEPDIR)/archive_entry_strmode.Plo
        -rm -f libarchive/$(DEPDIR)/archive_entry_xattr.Plo
-       -rm -f libarchive/$(DEPDIR)/archive_getdate.Plo
        -rm -f libarchive/$(DEPDIR)/archive_hmac.Plo
        -rm -f libarchive/$(DEPDIR)/archive_match.Plo
        -rm -f libarchive/$(DEPDIR)/archive_options.Plo
        -rm -f libarchive/$(DEPDIR)/archive_pack_dev.Plo
+       -rm -f libarchive/$(DEPDIR)/archive_parse_date.Plo
        -rm -f libarchive/$(DEPDIR)/archive_pathmatch.Plo
        -rm -f libarchive/$(DEPDIR)/archive_ppmd7.Plo
        -rm -f libarchive/$(DEPDIR)/archive_ppmd8.Plo
@@ -16597,6 +16809,7 @@ distclean: distclean-am
        -rm -f libarchive/$(DEPDIR)/archive_read_support_format_zip.Plo
        -rm -f libarchive/$(DEPDIR)/archive_string.Plo
        -rm -f libarchive/$(DEPDIR)/archive_string_sprintf.Plo
+       -rm -f libarchive/$(DEPDIR)/archive_time.Plo
        -rm -f libarchive/$(DEPDIR)/archive_util.Plo
        -rm -f libarchive/$(DEPDIR)/archive_version_details.Plo
        -rm -f libarchive/$(DEPDIR)/archive_virtual.Plo
@@ -16667,11 +16880,11 @@ distclean: distclean-am
        -rm -f libarchive/$(DEPDIR)/test-archive_entry_stat.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_entry_strmode.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_entry_xattr.Po
-       -rm -f libarchive/$(DEPDIR)/test-archive_getdate.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_hmac.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_match.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_options.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_pack_dev.Po
+       -rm -f libarchive/$(DEPDIR)/test-archive_parse_date.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_pathmatch.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_ppmd7.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_ppmd8.Po
@@ -16727,6 +16940,7 @@ distclean: distclean-am
        -rm -f libarchive/$(DEPDIR)/test-archive_read_support_format_zip.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_string.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_string_sprintf.Po
+       -rm -f libarchive/$(DEPDIR)/test-archive_time.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_util.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_version_details.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_virtual.Po
@@ -16793,10 +17007,10 @@ distclean: distclean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_clear_error.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_cmdline.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_digest.Po
-       -rm -f libarchive/test/$(DEPDIR)/test-test_archive_getdate.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_match_owner.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_match_path.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_match_time.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_pathmatch.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_read.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_read_add_passphrase.Po
@@ -16905,6 +17119,7 @@ distclean: distclean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_filename.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_gz.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_lzma.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_length.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_skip_entry.Po
@@ -16936,6 +17151,7 @@ distclean: distclean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_encryption_partially.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_filter.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_invalid1.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_raw.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_concatenated.Po
@@ -16944,6 +17160,7 @@ distclean: distclean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_empty_with_gnulabel.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_filename.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_invalid_pax_size.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_large_attr.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tbz.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tgz.Po
@@ -17045,6 +17262,7 @@ distclean: distclean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_classic_indent.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_fflags.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_no_separator.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_quoted_filename.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_pax.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_raw.Po
@@ -17061,7 +17279,10 @@ distclean: distclean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_xar_empty.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip64_stream.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_store.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty_zip64.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_entry_size_unset.Po
@@ -17133,6 +17354,7 @@ distclean: distclean-am
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_lz4.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_lzma.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_lzop.Po
+       -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_n.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_newer_than.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_nodump.Po
@@ -17330,11 +17552,11 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/$(DEPDIR)/archive_entry_stat.Plo
        -rm -f libarchive/$(DEPDIR)/archive_entry_strmode.Plo
        -rm -f libarchive/$(DEPDIR)/archive_entry_xattr.Plo
-       -rm -f libarchive/$(DEPDIR)/archive_getdate.Plo
        -rm -f libarchive/$(DEPDIR)/archive_hmac.Plo
        -rm -f libarchive/$(DEPDIR)/archive_match.Plo
        -rm -f libarchive/$(DEPDIR)/archive_options.Plo
        -rm -f libarchive/$(DEPDIR)/archive_pack_dev.Plo
+       -rm -f libarchive/$(DEPDIR)/archive_parse_date.Plo
        -rm -f libarchive/$(DEPDIR)/archive_pathmatch.Plo
        -rm -f libarchive/$(DEPDIR)/archive_ppmd7.Plo
        -rm -f libarchive/$(DEPDIR)/archive_ppmd8.Plo
@@ -17390,6 +17612,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/$(DEPDIR)/archive_read_support_format_zip.Plo
        -rm -f libarchive/$(DEPDIR)/archive_string.Plo
        -rm -f libarchive/$(DEPDIR)/archive_string_sprintf.Plo
+       -rm -f libarchive/$(DEPDIR)/archive_time.Plo
        -rm -f libarchive/$(DEPDIR)/archive_util.Plo
        -rm -f libarchive/$(DEPDIR)/archive_version_details.Plo
        -rm -f libarchive/$(DEPDIR)/archive_virtual.Plo
@@ -17460,11 +17683,11 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/$(DEPDIR)/test-archive_entry_stat.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_entry_strmode.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_entry_xattr.Po
-       -rm -f libarchive/$(DEPDIR)/test-archive_getdate.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_hmac.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_match.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_options.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_pack_dev.Po
+       -rm -f libarchive/$(DEPDIR)/test-archive_parse_date.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_pathmatch.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_ppmd7.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_ppmd8.Po
@@ -17520,6 +17743,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/$(DEPDIR)/test-archive_read_support_format_zip.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_string.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_string_sprintf.Po
+       -rm -f libarchive/$(DEPDIR)/test-archive_time.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_util.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_version_details.Po
        -rm -f libarchive/$(DEPDIR)/test-archive_virtual.Po
@@ -17586,10 +17810,10 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_clear_error.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_cmdline.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_digest.Po
-       -rm -f libarchive/test/$(DEPDIR)/test-test_archive_getdate.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_match_owner.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_match_path.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_match_time.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_archive_parse_date.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_pathmatch.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_read.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_archive_read_add_passphrase.Po
@@ -17698,6 +17922,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_filename.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_gz.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_lzma.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_redundant_L.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_length.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_gtar_sparse_skip_entry.Po
@@ -17729,6 +17954,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_encryption_partially.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_filter.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_invalid1.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_rar_overflow.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_raw.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_concatenated.Po
@@ -17737,6 +17963,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_empty_with_gnulabel.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_filename.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_invalid_pax_size.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_g_large.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tar_pax_large_attr.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tbz.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_read_format_tgz.Po
@@ -17838,6 +18065,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_classic_indent.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_fflags.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_no_separator.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_preset_digests.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_mtree_quoted_filename.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_pax.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_raw.Po
@@ -17854,7 +18082,10 @@ maintainer-clean: maintainer-clean-am
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_xar_empty.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip64_stream.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_bzip2.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_lzmaxz.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_store.Po
+       -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_compression_zstd.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_empty_zip64.Po
        -rm -f libarchive/test/$(DEPDIR)/test-test_write_format_zip_entry_size_unset.Po
@@ -17926,6 +18157,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_lz4.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_lzma.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_lzop.Po
+       -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_mtime.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_n.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_newer_than.Po
        -rm -f tar/test/$(DEPDIR)/bsdtar_test-test_option_nodump.Po
Index: pkgsrc/archivers/libarchive/files/config.h.in
diff -u pkgsrc/archivers/libarchive/files/config.h.in:1.20 pkgsrc/archivers/libarchive/files/config.h.in:1.21
--- pkgsrc/archivers/libarchive/files/config.h.in:1.20  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/config.h.in       Wed May 21 15:25:47 2025
@@ -652,6 +652,9 @@
 /* Define to 1 if you have the `expat' library (-lexpat). */
 #undef HAVE_LIBEXPAT
 
+/* Define to 1 if you have the `iconv' library (-liconv). */
+#undef HAVE_LIBICONV
+
 /* Define to 1 if you have the `lz4' library (-llz4). */
 #undef HAVE_LIBLZ4
 
@@ -694,9 +697,15 @@
 /* Define to 1 if you have the <libxml/xmlreader.h> header file. */
 #undef HAVE_LIBXML_XMLREADER_H
 
+/* Define to 1 if you have the <libxml/xmlversion.h> header file. */
+#undef HAVE_LIBXML_XMLVERSION_H
+
 /* Define to 1 if you have the <libxml/xmlwriter.h> header file. */
 #undef HAVE_LIBXML_XMLWRITER_H
 
+/* Define to 1 if you have zlib >= 1.2.1 */
+#undef HAVE_LIBZ
+
 /* Define to 1 if you have the `zstd' library (-lzstd). */
 #undef HAVE_LIBZSTD
 
@@ -794,6 +803,9 @@
 /* Define to 1 if you have the <mbedtls/pkcs5.h> header file. */
 #undef HAVE_MBEDTLS_PKCS5_H
 
+/* Define to 1 if you have the <mbedtls/version.h> header file. */
+#undef HAVE_MBEDTLS_VERSION_H
+
 /* Define to 1 if you have the `mbrtowc' function. */
 #undef HAVE_MBRTOWC
 
@@ -854,6 +866,9 @@
 /* Define to 1 if you have the <nettle/sha.h> header file. */
 #undef HAVE_NETTLE_SHA_H
 
+/* Define to 1 if you have the <nettle/version.h> header file. */
+#undef HAVE_NETTLE_VERSION_H
+
 /* Define to 1 if you have the `nl_langinfo' function. */
 #undef HAVE_NL_LANGINFO
 
@@ -863,6 +878,9 @@
 /* Define to 1 if you have the <openssl/evp.h> header file. */
 #undef HAVE_OPENSSL_EVP_H
 
+/* Define to 1 if you have the <openssl/opensslv.h> header file. */
+#undef HAVE_OPENSSL_OPENSSLV_H
+
 /* Define to 1 if you have the <paths.h> header file. */
 #undef HAVE_PATHS_H
 
@@ -1263,6 +1281,9 @@
    support. */
 #undef HAVE_ZSTD_compressStream
 
+/* Define to 1 if you have a `zstd' library version with ZSTD_minCLevel(). */
+#undef HAVE_ZSTD_minCLevel
+
 /* Define to 1 if you have the `_fseeki64' function. */
 #undef HAVE__FSEEKI64
 
@@ -1275,12 +1296,24 @@
 /* Define as const if the declaration of iconv() needs const. */
 #undef ICONV_CONST
 
+/* Libacl version coming from pkg-config. */
+#undef LIBACL_PKGCONFIG_VERSION
+
 /* Version number of libarchive as a single integer */
 #undef LIBARCHIVE_VERSION_NUMBER
 
 /* Version number of libarchive */
 #undef LIBARCHIVE_VERSION_STRING
 
+/* Libattr version coming from pkg-config. */
+#undef LIBATTR_PKGCONFIG_VERSION
+
+/* Libb2 version coming from pkg-config. */
+#undef LIBB2_PKGCONFIG_VERSION
+
+/* Librichacl version coming from pkg-config. */
+#undef LIBRICHACL_PKGCONFIG_VERSION
+
 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
    slash. */
 #undef LSTAT_FOLLOWS_SLASHED_SYMLINK

Index: pkgsrc/archivers/libarchive/files/NEWS
diff -u pkgsrc/archivers/libarchive/files/NEWS:1.19 pkgsrc/archivers/libarchive/files/NEWS:1.20
--- pkgsrc/archivers/libarchive/files/NEWS:1.19 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/NEWS      Wed May 21 15:25:47 2025
@@ -1,3 +1,5 @@
+May 20, 2025: libarchive 3.8.0 released
+
 Mar 30, 2025: libarchive 3.7.9 released
 
 Mar 20, 2025: libarchive 3.7.8 released

Index: pkgsrc/archivers/libarchive/files/README.md
diff -u pkgsrc/archivers/libarchive/files/README.md:1.6 pkgsrc/archivers/libarchive/files/README.md:1.7
--- pkgsrc/archivers/libarchive/files/README.md:1.6     Tue Apr 30 06:05:16 2024
+++ pkgsrc/archivers/libarchive/files/README.md Wed May 21 15:25:47 2025
@@ -85,13 +85,14 @@ Currently, the library automatically det
   * PWB binary cpio
   * ISO9660 CD-ROM images (with optional Rockridge or Joliet extensions)
   * ZIP archives (with uncompressed or "deflate" compressed entries, including support for encrypted Zip archives)
-  * ZIPX archives (with support for bzip2, ppmd8, lzma and xz compressed entries)
+  * ZIPX archives (with support for bzip2, zstd, ppmd8, lzma and xz compressed entries)
   * GNU and BSD 'ar' archives
   * 'mtree' format
   * 7-Zip archives (including archives that use zstandard compression)
   * Microsoft CAB format
   * LHA and LZH archives
   * RAR and RAR 5.0 archives (with some limitations due to RAR's proprietary status)
+  * WARC archives
   * XAR archives
 
 The library also detects and handles any of the following before evaluating the archive:
@@ -120,15 +121,18 @@ The library can create archives in any o
   * PWB binary cpio
   * shar archives
   * ZIP archives (with uncompressed or "deflate" compressed entries)
+  * ZIPX archives (with bzip2, zstd, lzma or xz compressed entries)
   * GNU and BSD 'ar' archives
   * 'mtree' format
   * ISO9660 format
-  * 7-Zip archives
+  * 7-Zip archives (including archives that use zstandard compression)
+  * WARC archives
   * XAR archives
 
 When creating archives, the result can be filtered with any of the following:
 
   * uuencode
+  * base64
   * gzip compression
   * bzip2 compression
   * compress/LZW compression
@@ -241,4 +245,3 @@ questions we are asked about libarchive:
   appropriate.  It has many advantages over other tar formats
   (including the legacy GNU tar format) and is widely supported by
   current tar implementations.
-

Index: pkgsrc/archivers/libarchive/files/configure
diff -u pkgsrc/archivers/libarchive/files/configure:1.28 pkgsrc/archivers/libarchive/files/configure:1.29
--- pkgsrc/archivers/libarchive/files/configure:1.28    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/configure Wed May 21 15:25:47 2025
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for libarchive 3.7.9.
+# Generated by GNU Autoconf 2.71 for libarchive 3.8.0.
 #
 # Report bugs to <libarchive-discuss%googlegroups.com@localhost>.
 #
@@ -621,8 +621,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libarchive'
 PACKAGE_TARNAME='libarchive'
-PACKAGE_VERSION='3.7.9'
-PACKAGE_STRING='libarchive 3.7.9'
+PACKAGE_VERSION='3.8.0'
+PACKAGE_STRING='libarchive 3.8.0'
 PACKAGE_BUGREPORT='libarchive-discuss%googlegroups.com@localhost'
 PACKAGE_URL=''
 
@@ -678,6 +678,8 @@ LIBXML2_PC_LIBS
 LIBXML2_PC_CFLAGS
 LZMA_PC_LIBS
 LZMA_PC_CFLAGS
+ICONV_PC_LIBS
+ICONV_PC_CFLAGS
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
@@ -887,6 +889,8 @@ LT_SYS_LIBRARY_PATH
 PKG_CONFIG
 PKG_CONFIG_PATH
 PKG_CONFIG_LIBDIR
+ICONV_PC_CFLAGS
+ICONV_PC_LIBS
 LZMA_PC_CFLAGS
 LZMA_PC_LIBS
 LIBXML2_PC_CFLAGS
@@ -1439,7 +1443,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libarchive 3.7.9 to adapt to many kinds of systems.
+\`configure' configures libarchive 3.8.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1510,7 +1514,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libarchive 3.7.9:";;
+     short | recursive ) echo "Configuration of libarchive 3.8.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1614,6 +1618,10 @@ Some influential environment variables:
               directories to add to pkg-config's search path
   PKG_CONFIG_LIBDIR
               path overriding pkg-config's built-in search path
+  ICONV_PC_CFLAGS
+              C compiler flags for ICONV_PC, overriding pkg-config
+  ICONV_PC_LIBS
+              linker flags for ICONV_PC, overriding pkg-config
   LZMA_PC_CFLAGS
               C compiler flags for LZMA_PC, overriding pkg-config
   LZMA_PC_LIBS
@@ -1690,7 +1698,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libarchive configure 3.7.9
+libarchive configure 3.8.0
 generated by GNU Autoconf 2.71
 
 Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2484,7 +2492,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libarchive $as_me 3.7.9, which was
+It was created by libarchive $as_me 3.8.0, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   $ $0$ac_configure_args_raw
@@ -3764,7 +3772,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libarchive'
- VERSION='3.7.9'
+ VERSION='3.8.0'
 
 
 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -3937,15 +3945,15 @@ AM_BACKSLASH='\'
 
 # Libtool interface version bumps on any API change, so increments
 # whenever libarchive minor version does.
-ARCHIVE_MINOR=$(( (3007009 / 1000) % 1000 ))
+ARCHIVE_MINOR=$(( (3008000 / 1000) % 1000 ))
 # Libarchive 2.7 == libtool interface 9 = 2 + 7
 # Libarchive 2.8 == libtool interface 10 = 2 + 8
-# Libarchive 2.9 == libtool interface 11 = 2 + 8
+# Libarchive 2.9 == libtool interface 11 = 2 + 9
 # Libarchive 3.0 == libtool interface 12
 # Libarchive 3.1 == libtool interface 13
 ARCHIVE_INTERFACE=`echo $((13 + ${ARCHIVE_MINOR}))`
 # Libarchive revision is bumped on any source change === libtool revision
-ARCHIVE_REVISION=$(( 3007009 % 1000 ))
+ARCHIVE_REVISION=$(( 3008000 % 1000 ))
 # Libarchive minor is bumped on any interface addition === libtool age
 ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_INTERFACE:$ARCHIVE_REVISION:$ARCHIVE_MINOR
 
@@ -3954,33 +3962,33 @@ ARCHIVE_LIBTOOL_VERSION=$ARCHIVE_INTERFA
 printf "%s\n" "#define __LIBARCHIVE_CONFIG_H_INCLUDED 1" >>confdefs.h
 
 
-printf "%s\n" "#define LIBARCHIVE_VERSION_STRING \"3.7.9\"" >>confdefs.h
+printf "%s\n" "#define LIBARCHIVE_VERSION_STRING \"3.8.0\"" >>confdefs.h
 
 
-printf "%s\n" "#define LIBARCHIVE_VERSION_NUMBER \"3007009\"" >>confdefs.h
+printf "%s\n" "#define LIBARCHIVE_VERSION_NUMBER \"3008000\"" >>confdefs.h
 
 
-printf "%s\n" "#define BSDCPIO_VERSION_STRING \"3.7.9\"" >>confdefs.h
+printf "%s\n" "#define BSDCPIO_VERSION_STRING \"3.8.0\"" >>confdefs.h
 
 
-printf "%s\n" "#define BSDTAR_VERSION_STRING \"3.7.9\"" >>confdefs.h
+printf "%s\n" "#define BSDTAR_VERSION_STRING \"3.8.0\"" >>confdefs.h
 
 
-printf "%s\n" "#define BSDCAT_VERSION_STRING \"3.7.9\"" >>confdefs.h
+printf "%s\n" "#define BSDCAT_VERSION_STRING \"3.8.0\"" >>confdefs.h
 
 
-printf "%s\n" "#define BSDUNZIP_VERSION_STRING \"3.7.9\"" >>confdefs.h
+printf "%s\n" "#define BSDUNZIP_VERSION_STRING \"3.8.0\"" >>confdefs.h
 
 
 # The shell variables here must be the same as the AC_SUBST() variables
 # below, but the shell variable names apparently cannot be the same as
 # the m4 macro names above.  Why?  Ask autoconf.
-BSDCPIO_VERSION_STRING=3.7.9
-BSDTAR_VERSION_STRING=3.7.9
-BSDCAT_VERSION_STRING=3.7.9
-BSDUNZIP_VERSION_STRING=3.7.9
-LIBARCHIVE_VERSION_STRING=3.7.9
-LIBARCHIVE_VERSION_NUMBER=3007009
+BSDCPIO_VERSION_STRING=3.8.0
+BSDTAR_VERSION_STRING=3.8.0
+BSDCAT_VERSION_STRING=3.8.0
+BSDUNZIP_VERSION_STRING=3.8.0
+LIBARCHIVE_VERSION_STRING=3.8.0
+LIBARCHIVE_VERSION_NUMBER=3008000
 
 # Substitute the above version numbers into the various files below.
 # Yes, I believe this is the fourth time we define what are essentially
@@ -15186,6 +15194,9 @@ then :
 
 printf "%s\n" "#define HAVE_ZLIB_H 1" >>confdefs.h
 
+
+printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h
+
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found a suitable version of zlib (>= 1.2.1)" >&5
 printf "%s\n" "found a suitable version of zlib (>= 1.2.1)" >&6; }
 
@@ -15350,6 +15361,12 @@ then :
 
 fi
 
+  BLAKE2_PC_VER=`pkg-config --modversion libb2`
+  if test "x$BLAKE2_PC_VER" != "x"; then
+
+printf "%s\n" "#define LIBB2_PKGCONFIG_VERSION \"$BLAKE2_PC_VER\"" >>confdefs.h
+
+  fi
 fi
 
  if test "x$ac_cv_lib_b2_blake2sp_init" != "xyes"; then
@@ -16403,10 +16420,217 @@ then :
 
 fi
 
-    am_save_LIBS="$LIBS"
     LIBS="${LIBS} ${LIBICONV}"
     if test -n "$LIBICONV"; then
-      LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
+
+printf "%s\n" "#define HAVE_LIBICONV 1" >>confdefs.h
+
+
+      # Most platforms do not provide iconv.pc, but MSYS2 MinGW does.
+      # We add it to our Requires.private only if it exists.
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+       if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  case $as_dir in #(((
+    '') as_dir=./ ;;
+    */) ;;
+    *) as_dir=$as_dir/ ;;
+  esac
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+       _pkg_min_version=0.9.0
+       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+       else
+               { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+               PKG_CONFIG=""
+       fi
+fi
+
+pkg_failed=no
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+printf %s "checking for iconv... " >&6; }
+
+if test -n "$ICONV_PC_CFLAGS"; then
+    pkg_cv_ICONV_PC_CFLAGS="$ICONV_PC_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"iconv\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "iconv") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ICONV_PC_CFLAGS=`$PKG_CONFIG --cflags "iconv" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$ICONV_PC_LIBS"; then
+    pkg_cv_ICONV_PC_LIBS="$ICONV_PC_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"iconv\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "iconv") 2>&5
+  ac_status=$?
+  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_ICONV_PC_LIBS=`$PKG_CONFIG --libs "iconv" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+                ICONV_PC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "iconv" 2>&1`
+        else
+                ICONV_PC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "iconv" 2>&1`
+        fi
+        # Put the nasty error message in config.log where it belongs
+        echo "$ICONV_PC_PKG_ERRORS" >&5
+
+        true
+elif test $pkg_failed = untried; then
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+        true
+else
+        ICONV_PC_CFLAGS=$pkg_cv_ICONV_PC_CFLAGS
+        ICONV_PC_LIBS=$pkg_cv_ICONV_PC_LIBS
+        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+
+        LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
+
+fi
     fi
     ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset"
 if test "x$ac_cv_func_locale_charset" = xyes
@@ -16415,7 +16639,6 @@ then :
 
 fi
 
-    LIBS="${am_save_LIBS}"
     if test "x$ac_cv_func_locale_charset" != "xyes"; then
       # If locale_charset() is not in libiconv, we have to find libcharset.
       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for locale_charset in -lcharset" >&5
@@ -16633,6 +16856,48 @@ printf "%s\n" "#define HAVE_ZSTD_compres
 
 fi
 
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ZSTD_minCLevel in -lzstd" >&5
+printf %s "checking for ZSTD_minCLevel in -lzstd... " >&6; }
+if test ${ac_cv_lib_zstd_ZSTD_minCLevel+y}
+then :
+  printf %s "(cached) " >&6
+else $as_nop
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lzstd  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+char ZSTD_minCLevel ();
+int
+main (void)
+{
+return ZSTD_minCLevel ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+  ac_cv_lib_zstd_ZSTD_minCLevel=yes
+else $as_nop
+  ac_cv_lib_zstd_ZSTD_minCLevel=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_minCLevel" >&5
+printf "%s\n" "$ac_cv_lib_zstd_ZSTD_minCLevel" >&6; }
+if test "x$ac_cv_lib_zstd_ZSTD_minCLevel" = xyes
+then :
+
+printf "%s\n" "#define HAVE_ZSTD_minCLevel 1" >>confdefs.h
+
+fi
+
 fi
 
 
@@ -17455,6 +17720,12 @@ then :
   printf "%s\n" "#define HAVE_LIBXML_XMLWRITER_H 1" >>confdefs.h
 
 fi
+ac_fn_c_check_header_compile "$LINENO" "libxml/xmlversion.h" "ac_cv_header_libxml_xmlversion_h" "$ac_includes_default"
+if test "x$ac_cv_header_libxml_xmlversion_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_LIBXML_XMLVERSION_H 1" >>confdefs.h
+
+fi
 
 fi
 if test "x$ac_cv_header_libxml_xmlreader_h" != "xyes"; then
@@ -20394,6 +20665,12 @@ else $as_nop
 fi
 printf "%s\n" "#define HAVE_DECL_XATTR_NOFOLLOW $ac_have_decl" >>confdefs.h
 
+    ATTR_PC_VER=`pkg-config --modversion libattr`
+    if test "x$ATTR_PC_VER" != "x"; then
+
+printf "%s\n" "#define LIBATTR_PKGCONFIG_VERSION \"$ATTR_PC_VER\"" >>confdefs.h
+
+    fi
     if test "x$ac_cv_header_sys_xattr_h" = "xyes" \
         -a "x$ac_cv_have_decl_XATTR_NOFOLLOW" = "xyes"; then
        # Darwin extended attributes support
@@ -20594,7 +20871,12 @@ then :
 
 fi
 
+    ACL_PC_VER=`pkg-config --modversion libacl`
+    if test "x$ACL_PC_VER" != "x"; then
 
+printf "%s\n" "#define LIBACL_PKGCONFIG_VERSION \"$ACL_PC_VER\"" >>confdefs.h
+
+    fi
     ac_fn_c_check_type "$LINENO" "acl_t" "ac_cv_type_acl_t" "
       #if HAVE_SYS_TYPES_H
       #include <sys/types.h>
@@ -20704,7 +20986,12 @@ then :
 
 fi
 
+    RICHACL_PC_VER=`pkg-config --modversion librichacl`
+    if test "x$RICHACL_PC_VER" != "x"; then
 
+printf "%s\n" "#define LIBRICHACL_PKGCONFIG_VERSION \"$RICHACL_PC_VER\"" >>confdefs.h
+
+    fi
     ac_fn_c_check_type "$LINENO" "struct richace" "ac_cv_type_struct_richace" "
       #if HAVE_SYS_RICHACL_H
       #include <sys/richacl.h>
@@ -22299,6 +22586,13 @@ then :
 
 fi
 
+    ac_fn_c_check_header_compile "$LINENO" "mbedtls/version.h" "ac_cv_header_mbedtls_version_h" "$ac_includes_default"
+if test "x$ac_cv_header_mbedtls_version_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_MBEDTLS_VERSION_H 1" >>confdefs.h
+
+fi
+
     saved_LIBS=$LIBS
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbedtls_sha1_init in -lmbedcrypto" >&5
 printf %s "checking for mbedtls_sha1_init in -lmbedcrypto... " >&6; }
@@ -22669,6 +22963,13 @@ then :
 
 fi
 
+    ac_fn_c_check_header_compile "$LINENO" "nettle/version.h" "ac_cv_header_nettle_version_h" "$ac_includes_default"
+if test "x$ac_cv_header_nettle_version_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_NETTLE_VERSION_H 1" >>confdefs.h
+
+fi
+
     saved_LIBS=$LIBS
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_sha1_init in -lnettle" >&5
 printf %s "checking for nettle_sha1_init in -lnettle... " >&6; }
@@ -23007,6 +23308,12 @@ then :
   printf "%s\n" "#define HAVE_OPENSSL_EVP_H 1" >>confdefs.h
 
 fi
+ac_fn_c_check_header_compile "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_opensslv_h" = xyes
+then :
+  printf "%s\n" "#define HAVE_OPENSSL_OPENSSLV_H 1" >>confdefs.h
+
+fi
 
     saved_LIBS=$LIBS
     LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }libcrypto"
@@ -24483,7 +24790,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libarchive $as_me 3.7.9, which was
+This file was extended by libarchive $as_me 3.8.0, which was
 generated by GNU Autoconf 2.71.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -24551,7 +24858,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config='$ac_cs_config_escaped'
 ac_cs_version="\\
-libarchive config.status 3.7.9
+libarchive config.status 3.8.0
 configured by $0, generated by GNU Autoconf 2.71,
   with options \\"\$ac_cs_config\\"
 

Index: pkgsrc/archivers/libarchive/files/configure.ac
diff -u pkgsrc/archivers/libarchive/files/configure.ac:1.27 pkgsrc/archivers/libarchive/files/configure.ac:1.28
--- pkgsrc/archivers/libarchive/files/configure.ac:1.27 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/configure.ac      Wed May 21 15:25:48 2025
@@ -4,8 +4,8 @@ dnl First, define all of the version num
 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.9])
-m4_define([LIBARCHIVE_VERSION_N],[3007009])
+m4_define([LIBARCHIVE_VERSION_S],[3.8.0])
+m4_define([LIBARCHIVE_VERSION_N],[3008000])
 
 dnl bsdtar and bsdcpio versioning tracks libarchive
 m4_define([BSDTAR_VERSION_S],LIBARCHIVE_VERSION_S())
@@ -38,7 +38,7 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_R
 ARCHIVE_MINOR=$(( (LIBARCHIVE_VERSION_N() / 1000) % 1000 ))
 # Libarchive 2.7 == libtool interface 9 = 2 + 7
 # Libarchive 2.8 == libtool interface 10 = 2 + 8
-# Libarchive 2.9 == libtool interface 11 = 2 + 8
+# Libarchive 2.9 == libtool interface 11 = 2 + 9
 # Libarchive 3.0 == libtool interface 12
 # Libarchive 3.1 == libtool interface 13
 ARCHIVE_INTERFACE=`echo $((13 + ${ARCHIVE_MINOR}))`
@@ -399,6 +399,7 @@ if test "x$with_zlib" != "xno"; then
       int main(int argc, char **argv) { inflate(NULL, 0); return 0; }
     ]])],
     [AC_DEFINE([HAVE_ZLIB_H], [1], [Define to 1 if you have zlib >= 1.2.1])
+      AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have zlib >= 1.2.1])
       AC_MSG_RESULT([found a suitable version of zlib (>= 1.2.1)])
     ],
     [AC_MSG_RESULT([could not find a suitable version of zlib (>= 1.2.1)])
@@ -441,6 +442,10 @@ AC_ARG_WITH([libb2],
 if test "x$with_libb2" != "xno"; then
   AC_CHECK_HEADERS([blake2.h])
   AC_CHECK_LIB(b2,blake2sp_init)
+  BLAKE2_PC_VER=`pkg-config --modversion libb2`
+  if test "x$BLAKE2_PC_VER" != "x"; then
+    AC_DEFINE_UNQUOTED([LIBB2_PKGCONFIG_VERSION], ["$BLAKE2_PC_VER"], [Libb2 version coming from pkg-config.])
+  fi
 fi
 
 AM_CONDITIONAL([INC_BLAKE2], [test "x$ac_cv_lib_b2_blake2sp_init" != "xyes"])
@@ -453,13 +458,17 @@ if test "x$with_iconv" != "xno"; then
   AC_CHECK_HEADERS([iconv.h],[],[],[#include <stdlib.h>])
   if test "x$am_cv_func_iconv" = "xyes"; then
     AC_CHECK_HEADERS([localcharset.h])
-    am_save_LIBS="$LIBS"
     LIBS="${LIBS} ${LIBICONV}"
     if test -n "$LIBICONV"; then
-      LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
+      AC_DEFINE([HAVE_LIBICONV], [1], [Define to 1 if you have the `iconv' library (-liconv).])
+
+      # Most platforms do not provide iconv.pc, but MSYS2 MinGW does.
+      # We add it to our Requires.private only if it exists.
+      PKG_CHECK_MODULES(ICONV_PC, [iconv], [
+        LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }iconv"
+      ], [true])
     fi
     AC_CHECK_FUNCS([locale_charset])
-    LIBS="${am_save_LIBS}"
     if test "x$ac_cv_func_locale_charset" != "xyes"; then
       # If locale_charset() is not in libiconv, we have to find libcharset.
       AC_CHECK_LIB(charset,locale_charset)
@@ -483,6 +492,8 @@ if test "x$with_zstd" != "xno"; then
   AC_CHECK_LIB(zstd,ZSTD_decompressStream)
   AC_CHECK_LIB(zstd,ZSTD_compressStream,
     AC_DEFINE([HAVE_ZSTD_compressStream], [1], [Define to 1 if you have the `zstd' library (-lzstd) with compression support.]))
+  AC_CHECK_LIB(zstd,ZSTD_minCLevel,
+    AC_DEFINE([HAVE_ZSTD_minCLevel], [1], [Define to 1 if you have a `zstd' library version with ZSTD_minCLevel().]))
 fi
 
 AC_ARG_WITH([lzma],
@@ -553,7 +564,7 @@ if test "x$with_xml2" != "xno"; then
   ], [
     AC_CHECK_LIB(xml2,xmlInitParser)
   ])
-  AC_CHECK_HEADERS([libxml/xmlreader.h libxml/xmlwriter.h])
+  AC_CHECK_HEADERS([libxml/xmlreader.h libxml/xmlwriter.h libxml/xmlversion.h])
 fi
 if test "x$ac_cv_header_libxml_xmlreader_h" != "xyes"; then
   if test "x$with_expat" != "xno"; then
@@ -914,6 +925,10 @@ if test "x$enable_xattr" != "xno"; then
 ])
     AC_CHECK_DECLS([XATTR_NOFOLLOW], [], [], [#include <sys/xattr.h>
 ])
+    ATTR_PC_VER=`pkg-config --modversion libattr`
+    if test "x$ATTR_PC_VER" != "x"; then
+      AC_DEFINE_UNQUOTED([LIBATTR_PKGCONFIG_VERSION], ["$ATTR_PC_VER"], [Libattr version coming from pkg-config.])
+    fi
     if test "x$ac_cv_header_sys_xattr_h" = "xyes" \
         -a "x$ac_cv_have_decl_XATTR_NOFOLLOW" = "xyes"; then
        # Darwin extended attributes support
@@ -1009,7 +1024,10 @@ AC_ARG_ENABLE([acl],
 if test "x$enable_acl" != "xno"; then
     # Libacl
     AC_CHECK_LIB([acl], [acl_get_file])
-
+    ACL_PC_VER=`pkg-config --modversion libacl`
+    if test "x$ACL_PC_VER" != "x"; then
+      AC_DEFINE_UNQUOTED([LIBACL_PKGCONFIG_VERSION], ["$ACL_PC_VER"], [Libacl version coming from pkg-config.])
+    fi
     AC_CHECK_TYPES([acl_t, acl_entry_t, acl_permset_t, acl_tag_t], [], [], [
       #if HAVE_SYS_TYPES_H
       #include <sys/types.h>
@@ -1020,7 +1038,10 @@ if test "x$enable_acl" != "xno"; then
     ])
 
     AC_CHECK_LIB([richacl], [richacl_get_file])
-
+    RICHACL_PC_VER=`pkg-config --modversion librichacl`
+    if test "x$RICHACL_PC_VER" != "x"; then
+      AC_DEFINE_UNQUOTED([LIBRICHACL_PKGCONFIG_VERSION], ["$RICHACL_PC_VER"], [Librichacl version coming from pkg-config.])
+    fi
     AC_CHECK_TYPES([[struct richace], [struct richacl]], [], [], [
       #if HAVE_SYS_RICHACL_H
       #include <sys/richacl.h>
@@ -1303,6 +1324,7 @@ fi
 
 if test "x$with_mbedtls" = "xyes"; then
     AC_CHECK_HEADERS([mbedtls/aes.h mbedtls/md.h mbedtls/pkcs5.h])
+    AC_CHECK_HEADERS([mbedtls/version.h])
     saved_LIBS=$LIBS
     AC_CHECK_LIB(mbedcrypto,mbedtls_sha1_init)
     CRYPTO_CHECK(MD5, MBEDTLS, md5)
@@ -1319,6 +1341,7 @@ fi
 if test "x$with_nettle" = "xyes"; then
     AC_CHECK_HEADERS([nettle/md5.h nettle/ripemd160.h nettle/sha.h])
     AC_CHECK_HEADERS([nettle/pbkdf2.h nettle/aes.h nettle/hmac.h])
+    AC_CHECK_HEADERS([nettle/version.h])
     saved_LIBS=$LIBS
     AC_CHECK_LIB(nettle,nettle_sha1_init)
     CRYPTO_CHECK(MD5, NETTLE, md5)
@@ -1333,7 +1356,7 @@ if test "x$with_nettle" = "xyes"; then
 fi
 
 if test "x$with_openssl" != "xno"; then
-    AC_CHECK_HEADERS([openssl/evp.h])
+    AC_CHECK_HEADERS([openssl/evp.h openssl/opensslv.h])
     saved_LIBS=$LIBS
     LIBSREQUIRED="$LIBSREQUIRED${LIBSREQUIRED:+ }libcrypto"
     AC_CHECK_LIB(crypto,OPENSSL_config)

Index: pkgsrc/archivers/libarchive/files/build/autogen.sh
diff -u pkgsrc/archivers/libarchive/files/build/autogen.sh:1.4 pkgsrc/archivers/libarchive/files/build/autogen.sh:1.5
--- pkgsrc/archivers/libarchive/files/build/autogen.sh:1.4      Sat Feb 25 21:11:18 2017
+++ pkgsrc/archivers/libarchive/files/build/autogen.sh  Wed May 21 15:25:48 2025
@@ -1,7 +1,7 @@
 #!/bin/sh
+set -eu
 
 PATH=/usr/local/gnu-autotools/bin/:$PATH
-export PATH
 
 # Start from one level above the build directory
 if [ -f version ]; then
@@ -49,7 +49,7 @@ perl -p -i -e 's/(m4_define\(\[LIBARCHIV
 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
+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

Index: pkgsrc/archivers/libarchive/files/build/bump-version.sh
diff -u pkgsrc/archivers/libarchive/files/build/bump-version.sh:1.2 pkgsrc/archivers/libarchive/files/build/bump-version.sh:1.3
--- pkgsrc/archivers/libarchive/files/build/bump-version.sh:1.2 Sat Jan 17 12:44:48 2015
+++ pkgsrc/archivers/libarchive/files/build/bump-version.sh     Wed May 21 15:25:48 2025
@@ -1,4 +1,5 @@
 #!/bin/sh +v
+set -eu
 
 # Start from the build directory, where the version file is located
 if [ -f build/version ]; then

Index: pkgsrc/archivers/libarchive/files/build/clean.sh
diff -u pkgsrc/archivers/libarchive/files/build/clean.sh:1.3 pkgsrc/archivers/libarchive/files/build/clean.sh:1.4
--- pkgsrc/archivers/libarchive/files/build/clean.sh:1.3        Mon Jun 20 17:24:55 2016
+++ pkgsrc/archivers/libarchive/files/build/clean.sh    Wed May 21 15:25:48 2025
@@ -1,4 +1,5 @@
 #!/bin/sh
+set -eu
 
 #
 # Attempt to remove as many generated files as we can.

Index: pkgsrc/archivers/libarchive/files/build/version
diff -u pkgsrc/archivers/libarchive/files/build/version:1.14 pkgsrc/archivers/libarchive/files/build/version:1.15
--- pkgsrc/archivers/libarchive/files/build/version:1.14        Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/build/version     Wed May 21 15:25:48 2025
@@ -1 +1 @@
-3007009
+3008000

Index: pkgsrc/archivers/libarchive/files/build/cmake/config.h.in
diff -u pkgsrc/archivers/libarchive/files/build/cmake/config.h.in:1.14 pkgsrc/archivers/libarchive/files/build/cmake/config.h.in:1.15
--- pkgsrc/archivers/libarchive/files/build/cmake/config.h.in:1.14      Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/build/cmake/config.h.in   Wed May 21 15:25:48 2025
@@ -729,6 +729,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the `gcc' library (-lgcc). */
 #cmakedefine HAVE_LIBGCC 1
 
+/* Define to 1 if you have the `iconv' library (-liconv). */
+#cmakedefine HAVE_LIBICONV 1
+
 /* Define to 1 if you have the `lz4' library (-llz4). */
 #cmakedefine HAVE_LIBLZ4 1
 
@@ -765,6 +768,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <libxml/xmlwriter.h> header file. */
 #cmakedefine HAVE_LIBXML_XMLWRITER_H 1
 
+/* Define to 1 if you have the <libxml/xmlversion.h> header file. */
+#cmakedefine HAVE_LIBXML_XMLVERSION_H 1
+
 /* Define to 1 if you have the `z' library (-lz). */
 #cmakedefine HAVE_LIBZ 1
 
@@ -774,6 +780,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the ZSTD_compressStream function. */
 #cmakedefine HAVE_ZSTD_compressStream 1
 
+/* Define to 1 if you have the ZSTD_minCLevel function. */
+#cmakedefine HAVE_ZSTD_minCLevel 1
+
 /* Define to 1 if you have the <limits.h> header file. */
 #cmakedefine HAVE_LIMITS_H 1
 
@@ -865,6 +874,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <mbedtls/pkcs5.h> header file. */
 #cmakedefine HAVE_MBEDTLS_PKCS5_H 1
 
+/* Define to 1 if you have the <mbedtls/pkcs5.h> header file. */
+#cmakedefine HAVE_MBEDTLS_VERSION_H 1
+
 /* Define to 1 if you have the `mbrtowc' function. */
 #cmakedefine HAVE_MBRTOWC 1
 
@@ -910,6 +922,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <nettle/sha.h> header file. */
 #cmakedefine HAVE_NETTLE_SHA_H 1
 
+/* Define to 1 if you have the <nettle/version.h> header file. */
+#cmakedefine HAVE_NETTLE_VERSION_H 1
+
 /* Define to 1 if you have the `nl_langinfo' function. */
 #cmakedefine HAVE_NL_LANGINFO 1
 
@@ -919,6 +934,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <openssl/evp.h> header file. */
 #cmakedefine HAVE_OPENSSL_EVP_H 1
 
+/* Define to 1 if you have the <openssl/opensslv.h> header file. */
+#cmakedefine HAVE_OPENSSL_OPENSSLV_H 1
+
 /* Define to 1 if you have the <paths.h> header file. */
 #cmakedefine HAVE_PATHS_H 1
 
@@ -1141,7 +1159,6 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #cmakedefine HAVE_SYS_STAT_H 1
 
-
 /* Define to 1 if you have the <sys/sysmacros.h> header file. */
 #cmakedefine HAVE_SYS_SYSMACROS_H 1
 
@@ -1265,6 +1282,9 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you have a working FS_IOC_GETFLAGS */
 #cmakedefine HAVE_WORKING_FS_IOC_GETFLAGS 1
 
+/* Define to 1 if you have the Windows `xmllite' library (-lxmllite). */
+#cmakedefine HAVE_XMLLITE_H 1
+
 /* Define to 1 if you have the <zlib.h> header file. */
 #cmakedefine HAVE_ZLIB_H 1
 
@@ -1322,6 +1342,15 @@ typedef uint64_t uintmax_t;
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #cmakedefine TIME_WITH_SYS_TIME 1
 
+/* Version number of package */
+#cmakedefine LIBATTR_PKGCONFIG_VERSION "@LIBATTR_PKGCONFIG_VERSION@"
+
+/* Version number of package */
+#cmakedefine LIBACL_PKGCONFIG_VERSION "@LIBACL_PKGCONFIG_VERSION@"
+
+/* Version number of package */
+#cmakedefine LIBRICHACL_PKGCONFIG_VERSION "@LIBRICHACL_PKGCONFIG_VERSION@"
+
 /*
  * Some platform requires a macro to use extension functions.
  */

Index: pkgsrc/archivers/libarchive/files/contrib/libarchive.spec
diff -u pkgsrc/archivers/libarchive/files/contrib/libarchive.spec:1.9 pkgsrc/archivers/libarchive/files/contrib/libarchive.spec:1.10
--- pkgsrc/archivers/libarchive/files/contrib/libarchive.spec:1.9       Thu Jan 18 18:00:13 2024
+++ pkgsrc/archivers/libarchive/files/contrib/libarchive.spec   Wed May 21 15:25:48 2025
@@ -22,7 +22,6 @@ BuildRequires:  libzstd-devel
 BuildRequires:  lz4-devel
 BuildRequires:  lzo-devel
 BuildRequires:  openssl-devel
-BuildRequires:  sharutils
 BuildRequires:  xz-devel
 BuildRequires:  zlib-devel
 

Index: pkgsrc/archivers/libarchive/files/contrib/android/Android.mk
diff -u pkgsrc/archivers/libarchive/files/contrib/android/Android.mk:1.3 pkgsrc/archivers/libarchive/files/contrib/android/Android.mk:1.4
--- pkgsrc/archivers/libarchive/files/contrib/android/Android.mk:1.3    Sun Sep 22 09:55:07 2019
+++ pkgsrc/archivers/libarchive/files/contrib/android/Android.mk        Wed May 21 15:25:48 2025
@@ -37,11 +37,11 @@ libarchive_src_files := libarchive/archi
                                                libarchive/archive_entry_stat.c \
                                                libarchive/archive_entry_strmode.c \
                                                libarchive/archive_entry_xattr.c \
-                                               libarchive/archive_getdate.c \
                                                libarchive/archive_hmac.c \
                                                libarchive/archive_match.c \
                                                libarchive/archive_options.c \
                                                libarchive/archive_pack_dev.c \
+                                               libarchive/archive_parse_date.c \
                                                libarchive/archive_pathmatch.c \
                                                libarchive/archive_ppmd7.c \
                                                libarchive/archive_random.c \

Index: pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh
diff -u pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh:1.4 pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh:1.5
--- pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh:1.4        Sat Jan 17 12:44:48 2015
+++ pkgsrc/archivers/libarchive/files/contrib/psota-benchmark/tcp.sh    Wed May 21 15:25:48 2025
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # tar comparison program
 # 2007-10-25 Jan Psota
 

Index: pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt
diff -u pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt:1.4 pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt:1.5
--- pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt:1.4   Sat Oct 19 05:39:54 2024
+++ pkgsrc/archivers/libarchive/files/cpio/CMakeLists.txt       Wed May 21 15:25:48 2025
@@ -42,8 +42,10 @@ IF(ENABLE_CPIO)
   ENDIF(ENABLE_CPIO_SHARED)
 
   # Installation rules
-  INSTALL(TARGETS bsdcpio RUNTIME DESTINATION bin)
-  INSTALL_MAN(${bsdcpio_MANS})
+  IF(ENABLE_INSTALL)
+    INSTALL(TARGETS bsdcpio RUNTIME DESTINATION bin)
+    INSTALL_MAN(${bsdcpio_MANS})
+  ENDIF(ENABLE_INSTALL)
 
 ENDIF(ENABLE_CPIO)
 

Index: pkgsrc/archivers/libarchive/files/doc/update.sh
diff -u pkgsrc/archivers/libarchive/files/doc/update.sh:1.7 pkgsrc/archivers/libarchive/files/doc/update.sh:1.8
--- pkgsrc/archivers/libarchive/files/doc/update.sh:1.7 Sat Jan 17 12:44:48 2015
+++ pkgsrc/archivers/libarchive/files/doc/update.sh     Wed May 21 15:25:48 2025
@@ -1,12 +1,14 @@
 #!/bin/sh
-
-set -e
+set -eu
 
 #
 # Simple script to repopulate the 'doc' tree from
 # the mdoc man pages stored in each project.
 #
 
+script_dir=`dirname $0`
+cd "$script_dir"
+
 # Collect list of man pages, relative to my subdirs
 test -d man || mkdir man
 cd man

Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html:1.14        Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry.3.html     Wed May 21 15:25:48 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:17 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html:1.14 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html:1.14    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_disk.3.html Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html:1.14 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_util.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html:1.14        Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write.3.html     Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html:1.14   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_disk.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html:1.14      Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/bsdcpio.1.html   Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:39 2025 -->
+<!-- CreationDate: Tue May 20 09:02:21 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html:1.14       Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/bsdtar.1.html    Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:39 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
@@ -228,6 +228,12 @@ extracting entries from the archive.</p>
 to the current directory after processing any <b>-C</b>
 options and before extracting any files.</p>
 
+<p style="margin-top: 1em"><b>--clamp-mtime</b></p>
+
+<p style="margin-left:19%;">(use with <b>--mtime</b>) Only
+set the modification time if the file is newer than the date
+specified in <b>--mtime</b>.</p>
+
 
 <p style="margin-top: 1em"><b>--clear-nochange-fflags</b></p>
 
@@ -471,6 +477,11 @@ formats (</p>
 <p>including pax restricted, the default tar format for
 <b>bsdtar</b> )</p>
 
+<p style="margin-top: 1em"><b>--mtime</b> <i>date</i></p>
+
+<p style="margin-left:19%;">(c, r, u modes only) Set the
+modification times of added files to the specified date.</p>
+
 <p style="margin-top: 1em"><b>-n</b>, <b>--norecurse</b>,
 <b>--no-recursion</b></p>
 
@@ -543,11 +554,11 @@ the reverse of <b>--fflags</b> and the d
 
 <p style="margin-top: 1em"><b>--no-mac-metadata</b></p>
 
-<p style="margin-left:19%;">(x mode only) Mac OS X
-specific. Do not archive or extract ACLs and extended file
-attributes using <i>copyfile</i>(3) in AppleDouble format.
-This is the reverse of <b>--mac-metadata</b>. and the
-default behavior if <b>tar</b> is run as non-root in x
+<p style="margin-left:19%;">(c, r, u and x mode only) Mac
+OS X specific. Do not archive or extract ACLs and extended
+file attributes using <i>copyfile</i>(3) in AppleDouble
+format. This is the reverse of <b>--mac-metadata</b>. and
+the default behavior if <b>tar</b> is run as non-root in x
 mode.</p>
 
 <p style="margin-top: 1em"><b>--no-read-sparse</b></p>
Index: pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html:1.14 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/cpio.5.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html:1.14   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/libarchive-formats.5.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
@@ -388,9 +388,18 @@ format</b></p>
 
 <p style="margin-left:9%;">Libarchive can read and write
 zip format archives that have uncompressed entries and
-entries compressed with the &ldquo;deflate&rdquo; algorithm.
-Other zip compression algorithms are not supported. It can
-extract jar archives, archives that use Zip64 extensions and
+entries compressed with the &ldquo;deflate&rdquo; ,
+&ldquo;LZMA&rdquo; , &ldquo;XZ&rdquo; , &ldquo;BZIP2&rdquo;
+and &ldquo;ZSTD&rdquo; algorithms. Libarchive can also read,
+but not write, zip format archives that have entries
+compressed with the &ldquo;PPMd&rdquo; algorithm. Other zip
+compression algorithms are not supported. The extensions
+supported by libarchive are Zip64, Libarchive&rsquo;s
+extensions to better support streaming, PKZIP&rsquo;s
+traditional ZIP encryption, Info-ZIP&rsquo;s Unix extra
+fields, extra time, and Unicode path, as well as
+WinZIP&rsquo;s AES encryption. It can extract jar archives,
+__MACOSX resource forks extension for OS X, 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
Index: pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html:1.14   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/libarchive.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html:1.14 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/libarchive_internals.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html:1.14        Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/mtree.5.html     Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/tar.5.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/tar.5.html:1.14 pkgsrc/archivers/libarchive/files/doc/html/tar.5.html:1.15
--- pkgsrc/archivers/libarchive/files/doc/html/tar.5.html:1.14  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/tar.5.html       Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>

Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry_acl.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry_acl.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_entry_acl.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry_acl.3.html:1.13    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry_acl.3.html Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html:1.13        Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry_linkify.3.html     Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry_paths.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry_paths.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_entry_paths.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry_paths.3.html:1.13  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry_paths.3.html       Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry_perms.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry_perms.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_entry_perms.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry_perms.3.html:1.13  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry_perms.3.html       Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry_stat.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry_stat.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_entry_stat.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry_stat.3.html:1.13   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry_stat.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry_time.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry_time.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_entry_time.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry_time.3.html:1.13   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry_time.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_data.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_data.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_data.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_data.3.html:1.13    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_data.3.html Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_extract.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_extract.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_extract.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_extract.3.html:1.13 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_extract.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_filter.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_filter.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_filter.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_filter.3.html:1.13  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_filter.3.html       Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_format.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_format.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_format.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_format.3.html:1.13  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_format.3.html       Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
@@ -37,8 +37,10 @@ archive_read_support_format_iso9660,
 archive_read_support_format_lha,
 archive_read_support_format_mtree,
 archive_read_support_format_rar,
+archive_read_support_format_rar5,
 archive_read_support_format_raw,
 archive_read_support_format_tar,
+archive_read_support_format_warc,
 archive_read_support_format_xar,
 archive_read_support_format_zip &mdash; functions for
 reading streaming archives</p>
@@ -112,6 +114,11 @@ reading streaming archives</p>
 <p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
 
 
+<p style="margin-left:14%;"><b>archive_read_support_format_rar5</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
+
+<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
+
+
 <p style="margin-left:14%;"><b>archive_read_support_format_raw</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
 
 <p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
@@ -122,6 +129,11 @@ reading streaming archives</p>
 <p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
 
 
+<p style="margin-left:14%;"><b>archive_read_support_format_warc</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
+
+<p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
+
+
 <p style="margin-left:14%;"><b>archive_read_support_format_xar</b>(<i>struct&nbsp;archive&nbsp;*</i>);</p>
 
 <p style="margin-left:9%; margin-top: 1em"><i>int</i></p>
@@ -138,8 +150,10 @@ archive_read_support_format_7zip</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_rar5</b>(),
 <b>archive_read_support_format_raw</b>(),
 <b>archive_read_support_format_tar</b>(),
+<b>archive_read_support_format_warc</b>(),
 <b>archive_read_support_format_xar</b>(),
 <b>archive_read_support_format_zip</b>()</p>
 
@@ -148,7 +162,11 @@ auto-detection code---for the specified 
 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>
+variants. <b>archive_read_support_format_zip</b>() enables
+support for both the streaming and the seeking zip readers,
+which can separately be enabled by respectively
+<b>archive_read_support_format_zip_streamable</b>() and
+<b>archive_read_support_format_zip_seekable</b>()</p>
 
 <p><b>archive_read_support_format_all</b>()</p>
 
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_free.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_free.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_free.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_free.3.html:1.13    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_free.3.html Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_header.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_header.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_header.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_header.3.html:1.13  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_header.3.html       Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_new.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_new.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_new.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_new.3.html:1.13     Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_new.3.html  Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_open.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_open.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_open.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_open.3.html:1.13    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_open.3.html Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_set_options.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_set_options.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_read_set_options.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_set_options.3.html:1.13     Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_set_options.3.html  Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html:1.13      Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_blocksize.3.html   Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_data.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_data.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_data.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_data.3.html:1.13   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_data.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_filter.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_filter.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_filter.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_filter.3.html:1.13 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_filter.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html:1.13   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_finish_entry.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_format.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_format.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_format.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_format.3.html:1.13 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_format.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_free.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_free.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_free.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_free.3.html:1.13   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_free.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_header.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_header.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_header.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_header.3.html:1.13 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_header.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:37 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_new.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_new.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_new.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_new.3.html:1.13    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_new.3.html Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_open.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_open.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_open.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_open.3.html:1.13   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_open.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:19 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_options.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_options.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_options.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_options.3.html:1.13    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_options.3.html Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
@@ -277,7 +277,7 @@ to 30 for 32 bit, or 31 for 64 bit, are 
 <p style="margin-left:29%;">The value is interpreted as a
 decimal integer specifying the number of threads for
 multi-threaded zstd compression. If set to 0, zstd will
-attempt to detect and use the number of physical CPU
+attempt to detect and use the number of active physical CPU
 cores.</p>
 
 <p>Format 7zip <b><br>
@@ -286,21 +286,31 @@ compression</b></p>
 <p style="margin-left:29%;">The value is one of
 &ldquo;store&rdquo;, &ldquo;copy&rdquo;,
 &ldquo;deflate&rdquo;, &ldquo;bzip2&rdquo;,
-&ldquo;lzma1&rdquo;, &ldquo;lzma2&rdquo; or
-&ldquo;ppmd&rdquo; to indicate how the following entries
-should be compressed. The values &ldquo;store&rdquo; and
-&ldquo;copy&rdquo; are synonyms. Note that this setting is
-ignored for directories, symbolic links, and other special
-entries.</p>
+&ldquo;lzma1&rdquo;, &ldquo;lzma2&rdquo;,
+&ldquo;ppmd&rdquo;, or &ldquo;zstd&rdquo; to indicate how
+the following entries should be compressed. The values
+&ldquo;store&rdquo; and &ldquo;copy&rdquo; are synonyms.
+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:29%;">The value is interpreted as a
 decimal integer specifying the compression level. Values
 between 0 and 9 are supported, with the exception of bzip2
-which only supports values between 1 and 9. The
-interpretation of the compression level depends on the
-chosen compression method.</p>
+which only supports values between 1 and 9, and zstd which
+may support negative values depending on the library version
+and commonly used values 1 through 22. The interpretation of
+the compression level depends on the chosen compression
+method.</p>
+
+<p><b>threads</b></p>
+
+<p style="margin-left:29%;">The value is interpreted as a
+decimal integer specifying the number of threads for
+multi-threaded compression (for compressors like zstd that
+support it). If set to 0, an attempt will be made to
+discover the number of CPU cores.</p>
 
 <p>Format bin <b><br>
 hdrcharset</b></p>
@@ -720,10 +730,11 @@ contents checksum method. Supported valu
 compression</b></p>
 
 <p style="margin-left:29%;">The value is either
-&ldquo;store&rdquo; or &ldquo;deflate&rdquo; to indicate how
-the following entries should be compressed. Note that this
-setting is ignored for directories, symbolic links, and
-other special entries.</p>
+&ldquo;store&rdquo;, &ldquo;deflate&rdquo;,
+&ldquo;bzip2&rdquo;, &ldquo;lzma&rdquo;, &ldquo;xz&rdquo;,
+or &ldquo;zstd&rdquo; 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>
 
@@ -731,8 +742,21 @@ other special entries.</p>
 decimal integer specifying the compression level. Values
 between 0 and 9 are supported. A compression level of 0
 switches the compression method to &ldquo;store&rdquo;,
-other values will enable &ldquo;deflate&rdquo; compression
-with the given level.</p>
+other values will enable &ldquo;deflate&rdquo;,
+&ldquo;bzip2&rdquo;, &ldquo;lzma&rdquo;, or
+&ldquo;zstd&rdquo; compression (in order of priority,
+depending on what libraries are linked) with the given
+level.</p>
+
+<p><b>threads</b></p>
+
+<p style="margin-left:29%;">The value is interpreted as a
+decimal integer specifying the number of threads to use for
+compression. It is supported only for &ldquo;xz&rdquo; or
+&ldquo;zstd&rdquo; compression and ignored for any other. A
+threads value of 0 is a special one requesting to detect and
+use as many threads as the number of active physical CPU
+cores.</p>
 
 <p><b>encryption</b></p>
 
Index: pkgsrc/archivers/libarchive/files/doc/html/libarchive_changes.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/libarchive_changes.3.html:1.13 pkgsrc/archivers/libarchive/files/doc/html/libarchive_changes.3.html:1.14
--- pkgsrc/archivers/libarchive/files/doc/html/libarchive_changes.3.html:1.13   Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/libarchive_changes.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>

Index: pkgsrc/archivers/libarchive/files/doc/html/archive_entry_misc.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_entry_misc.3.html:1.8 pkgsrc/archivers/libarchive/files/doc/html/archive_entry_misc.3.html:1.9
--- pkgsrc/archivers/libarchive/files/doc/html/archive_entry_misc.3.html:1.8    Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_entry_misc.3.html        Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>

Index: pkgsrc/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html:1.10 pkgsrc/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html:1.11
--- pkgsrc/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html:1.10  Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_read_add_passphrase.3.html       Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:36 2025 -->
+<!-- CreationDate: Tue May 20 09:02:18 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>
Index: pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html
diff -u pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html:1.10 pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html:1.11
--- pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html:1.10 Mon Apr 28 10:31:33 2025
+++ pkgsrc/archivers/libarchive/files/doc/html/archive_write_set_passphrase.3.html      Wed May 21 15:25:49 2025
@@ -1,5 +1,5 @@
 <!-- Creator     : groff version 1.23.0 -->
-<!-- CreationDate: Sun Mar 30 20:07:38 2025 -->
+<!-- CreationDate: Tue May 20 09:02:20 2025 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd";>
 <html>

Index: pkgsrc/archivers/libarchive/files/doc/man/archive_read_format.3
diff -u pkgsrc/archivers/libarchive/files/doc/man/archive_read_format.3:1.3 pkgsrc/archivers/libarchive/files/doc/man/archive_read_format.3:1.4
--- pkgsrc/archivers/libarchive/files/doc/man/archive_read_format.3:1.3 Tue May 26 09:16:41 2020
+++ pkgsrc/archivers/libarchive/files/doc/man/archive_read_format.3     Wed May 21 15:25:49 2025
@@ -12,8 +12,10 @@
 \fB\%archive_read_support_format_lha\fP,
 \fB\%archive_read_support_format_mtree\fP,
 \fB\%archive_read_support_format_rar\fP,
+\fB\%archive_read_support_format_rar5\fP,
 \fB\%archive_read_support_format_raw\fP,
 \fB\%archive_read_support_format_tar\fP,
+\fB\%archive_read_support_format_warc\fP,
 \fB\%archive_read_support_format_xar\fP,
 \fB\%archive_read_support_format_zip\fP
 \- functions for reading streaming archives
@@ -70,6 +72,10 @@ Streaming Archive Library (libarchive, -
 .br
 \fIint\fP
 .br
+\fB\%archive_read_support_format_rar5\fP(\fI\%struct\ archive\ *\fP);
+.br
+\fIint\fP
+.br
 \fB\%archive_read_support_format_raw\fP(\fI\%struct\ archive\ *\fP);
 .br
 \fIint\fP
@@ -78,6 +84,10 @@ Streaming Archive Library (libarchive, -
 .br
 \fIint\fP
 .br
+\fB\%archive_read_support_format_warc\fP(\fI\%struct\ archive\ *\fP);
+.br
+\fIint\fP
+.br
 \fB\%archive_read_support_format_xar\fP(\fI\%struct\ archive\ *\fP);
 .br
 \fIint\fP
@@ -95,8 +105,10 @@ Streaming Archive Library (libarchive, -
 \fB\%archive_read_support_format_lha\fP(),
 \fB\%archive_read_support_format_mtree\fP(),
 \fB\%archive_read_support_format_rar\fP(),
+\fB\%archive_read_support_format_rar5\fP(),
 \fB\%archive_read_support_format_raw\fP(),
 \fB\%archive_read_support_format_tar\fP(),
+\fB\%archive_read_support_format_warc\fP(),
 \fB\%archive_read_support_format_xar\fP(),
 \fB\%archive_read_support_format_zip\fP()
 Enables support---including auto-detection code---for the
@@ -105,6 +117,12 @@ For example,
 \fB\%archive_read_support_format_tar\fP()
 enables support for a variety of standard tar formats, old-style tar,
 ustar, pax interchange format, and many common variants.
+\fB\%archive_read_support_format_zip\fP()
+enables support for both the streaming and the seeking zip readers,
+which can separately be enabled by respectively
+\fB\%archive_read_support_format_zip_streamable\fP()
+and
+\fB\%archive_read_support_format_zip_seekable\fP()
 .TP
 \fB\%archive_read_support_format_all\fP()
 Enables support for all available formats except the

Index: pkgsrc/archivers/libarchive/files/doc/man/archive_write_set_options.3
diff -u pkgsrc/archivers/libarchive/files/doc/man/archive_write_set_options.3:1.5 pkgsrc/archivers/libarchive/files/doc/man/archive_write_set_options.3:1.6
--- pkgsrc/archivers/libarchive/files/doc/man/archive_write_set_options.3:1.5   Fri Apr 12 15:39:49 2024
+++ pkgsrc/archivers/libarchive/files/doc/man/archive_write_set_options.3       Wed May 21 15:25:49 2025
@@ -263,7 +263,7 @@ decimal integer specifying log2 window s
 The value is interpreted as a decimal integer specifying the
 number of threads for multi-threaded zstd compression.
 If set to 0, zstd will attempt to detect and use the number
-of physical CPU cores.
+of active physical CPU cores.
 .RE
 .TP
 Format 7zip
@@ -276,9 +276,10 @@ The value is one of
 ``deflate'',
 ``bzip2'',
 ``lzma1'',
-``lzma2''
+``lzma2'',
+``ppmd'',
 or
-``ppmd''
+``zstd''
 to indicate how the following entries should be compressed.
 The values
 ``store''
@@ -292,9 +293,17 @@ and other special entries.
 The value is interpreted as a decimal integer specifying the
 compression level.
 Values between 0 and 9 are supported, with the exception of bzip2
-which only supports values between 1 and 9.
+which only supports values between 1 and 9, and zstd which may
+support negative values depending on the library version and
+commonly used values 1 through 22.
 The interpretation of the compression level depends on the chosen
 compression method.
+.TP
+\fBthreads\fP
+The value is interpreted as a decimal integer specifying the
+number of threads for multi-threaded compression (for compressors
+like zstd that support it). If set to 0, an attempt will be made
+to discover the number of CPU cores.
 .RE
 .TP
 Format bin
@@ -705,9 +714,13 @@ Format zip
 .TP
 \fBcompression\fP
 The value is either
-``store''
+``store'',
+``deflate'',
+``bzip2'',
+``lzma'',
+``xz'',
 or
-``deflate''
+``zstd''
 to indicate how the following entries should be compressed.
 Note that this setting is ignored for directories, symbolic links,
 and other special entries.
@@ -719,8 +732,24 @@ 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.
+``deflate'',
+``bzip2'',
+``lzma'',
+or
+``zstd''
+compression (in order of priority, depending on what libraries 
+are linked) with the given level.
+.TP
+\fBthreads\fP
+The value is interpreted as a decimal integer specifying the
+number of threads to use for compression.
+It is supported only for
+``xz''
+or
+``zstd''
+compression and ignored for any other.
+A threads value of 0 is a special one requesting to detect and use as
+many threads as the number of active physical CPU cores.
 .TP
 \fBencryption\fP
 Enable encryption using traditional zip encryption.

Index: pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1
diff -u pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1:1.15 pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1:1.16
--- pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1:1.15     Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/doc/man/bsdtar.1  Wed May 21 15:25:49 2025
@@ -224,6 +224,12 @@ to the current directory after processin
 \fB\-C\fP
 options and before extracting any files.
 .TP
+\fB\-Fl\fP clamp-mtime
+(use with
+\fB\-Fl\fP mtime)
+Only set the modification time if the file is newer than the date specified in
+\fB\-Fl\fP mtime.
+.TP
 \fB\-Fl\fP clear-nochange-fflags
 (x mode only)
 Before removing file system objects to replace them, clear platform-specific
@@ -475,6 +481,10 @@ Currently supported only for pax formats
 Po including pax restricted, the default tar format for
 \fB\%bsdtar\fP Pc
 .TP
+\fB\-Fl\fP mtime \fIdate\fP
+(c, r, u modes only)
+Set the modification times of added files to the specified date.
+.TP
 \fB\-n\fP, \fB\-Fl\fP norecurse, \fB\-Fl\fP no-recursion
 Do not operate recursively on the content of directories.
 .TP
@@ -541,7 +551,7 @@ and the default behavior if
 is run as non-root in x mode.
 .TP
 \fB\-Fl\fP no-mac-metadata
-(x mode only)
+(c, r, u and x mode only)
 Mac OS X specific.
 Do not archive or extract ACLs and extended file attributes
 using

Index: pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5
diff -u pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5:1.7 pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5:1.8
--- pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5:1.7  Thu Jan 18 18:00:14 2024
+++ pkgsrc/archivers/libarchive/files/doc/man/libarchive-formats.5      Wed May 21 15:25:49 2025
@@ -315,10 +315,26 @@ by the usual environment variables.
 Libarchive can read and write zip format archives that have
 uncompressed entries and entries compressed with the
 ``deflate''
+,
+``LZMA''
+,
+``XZ''
+,
+``BZIP2''
+and
+``ZSTD''
+algorithms.
+Libarchive can also read, but not write, zip format archives that
+have entries compressed with the
+``PPMd''
 algorithm.
 Other zip compression algorithms are not supported.
-It can extract jar archives, archives that use Zip64 extensions and
-self-extracting zip archives.
+The extensions supported by libarchive are Zip64, Libarchive's
+extensions to better support streaming, PKZIP's traditional
+ZIP encryption, Info-ZIP's Unix extra fields, extra time, and
+Unicode path, as well as WinZIP's AES encryption.
+It can extract jar archives, __MACOSX resource forks extension
+for OS X, 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

Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_disk.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_util.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_disk.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/bsdcpio.1.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/bsdtar.1.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/cpio.5.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/libarchive-formats.5.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/libarchive.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/libarchive_internals.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/mtree.5.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/tar.5.pdf
Binary files are different

Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_acl.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_linkify.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_paths.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_perms.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_stat.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_time.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_data.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_extract.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_filter.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_format.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_free.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_header.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_new.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_open.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_set_options.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_blocksize.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_data.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_filter.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_finish_entry.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_format.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_free.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_header.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_new.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_open.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_set_options.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/libarchive_changes.3.pdf
Binary files are different

Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_entry_misc.3.pdf
Binary files are different

Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_read_add_passphrase.3.pdf
Binary files are different
Index: pkgsrc/archivers/libarchive/files/doc/pdf/archive_write_set_passphrase.3.pdf
Binary files are different

Index: pkgsrc/archivers/libarchive/files/doc/text/archive_read_format.3.txt
diff -u pkgsrc/archivers/libarchive/files/doc/text/archive_read_format.3.txt:1.7 pkgsrc/archivers/libarchive/files/doc/text/archive_read_format.3.txt:1.8
--- pkgsrc/archivers/libarchive/files/doc/text/archive_read_format.3.txt:1.7    Sat Oct 19 05:39:57 2024
+++ pkgsrc/archivers/libarchive/files/doc/text/archive_read_format.3.txt        Wed May 21 15:25:50 2025
@@ -6,9 +6,10 @@
        archive_read_support_format_cab,             archive_read_support_format_cpio,
        archive_read_support_format_empty, archive_read_support_format_iso9660,
        archive_read_support_format_lha,            archive_read_support_format_mtree,
-       archive_read_support_format_rar,              archive_read_support_format_raw,
-       archive_read_support_format_tar,              archive_read_support_format_xar,
-       archive_read_support_format_zip  —  functions  for  reading  streaming
+       archive_read_support_format_rar,             archive_read_support_format_rar5,
+       archive_read_support_format_raw,              archive_read_support_format_tar,
+       archive_read_support_format_warc,      archive_read_support_format_xar,
+       archive_read_support_format_zip —  functions  for  reading   streaming
        archives
 
 1mLIBRARY0m
@@ -51,12 +52,18 @@
        1marchive_read_support_format_rar22m(4mstruct24m 4marchive24m 4m*24m);
 
        4mint0m
+       1marchive_read_support_format_rar522m(4mstruct24m 4marchive24m 4m*24m);
+
+       4mint0m
        1marchive_read_support_format_raw22m(4mstruct24m 4marchive24m 4m*24m);
 
        4mint0m
        1marchive_read_support_format_tar22m(4mstruct24m 4marchive24m 4m*24m);
 
        4mint0m
+       1marchive_read_support_format_warc22m(4mstruct24m 4marchive24m 4m*24m);
+
+       4mint0m
        1marchive_read_support_format_xar22m(4mstruct24m 4marchive24m 4m*24m);
 
        4mint0m
@@ -70,15 +77,22 @@
               1marchive_read_support_format_lha22m(),
               1marchive_read_support_format_mtree22m(),
               1marchive_read_support_format_rar22m(),
+              1marchive_read_support_format_rar522m(),
               1marchive_read_support_format_raw22m(),
               1marchive_read_support_format_tar22m(),
+              1marchive_read_support_format_warc22m(),
               1marchive_read_support_format_xar22m(),
               1marchive_read_support_format_zip22m()
               Enables support---including auto-detection code---for the spec‐
               ified        archive        format.         For        example,
               1marchive_read_support_format_tar22m() enables support for a variety
-              of standard tar formats, old-style tar, ustar, pax  interchange
-              format, and many common variants.
+              of  standard tar formats, old-style tar, ustar, pax interchange
+              format,        and        many         common         variants.
+              1marchive_read_support_format_zip22m()  enables support for both the
+              streaming and the seeking zip readers, which can separately  be
+              enabled                     by                     respectively
+              1marchive_read_support_format_zip_streamable22m()                and
+              1marchive_read_support_format_zip_seekable22m()
        1marchive_read_support_format_all22m()
               Enables support for all available formats except the “raw” for‐
               mat (see below).

Index: pkgsrc/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt
diff -u pkgsrc/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt:1.9 pkgsrc/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt:1.10
--- pkgsrc/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt:1.9      Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/doc/text/archive_write_set_options.3.txt  Wed May 21 15:25:50 2025
@@ -150,262 +150,270 @@
                       The  value is interpreted as a decimal integer specify‐
                       ing the number of threads for multi-threaded zstd  com‐
                       pression.  If set to 0, zstd will attempt to detect and
-                      use the number of physical CPU cores.
+                      use the number of active physical CPU cores.
        Format 7zip
               1mcompression0m
                       The   value  is  one  of  “store”,  “copy”,  “deflate”,
-                      “bzip2”, “lzma1”, “lzma2” or “ppmd” to indicate how the
-                      following entries should  be  compressed.   The  values
-                      “store”  and  “copy” are synonyms.  Note that this set‐
-                      ting is ignored for directories,  symbolic  links,  and
-                      other special entries.
+                      “bzip2”, “lzma1”, “lzma2”, “ppmd”, or “zstd”  to  indi‐
+                      cate  how  the  following entries should be compressed.
+                      The values “store” and “copy” are synonyms.  Note  that
+                      this  setting  is  ignored  for  directories,  symbolic
+                      links, and other special entries.
               1mcompression-level0m
-                      The  value is interpreted as a decimal integer specify‐
-                      ing the compression level.  Values between 0 and 9  are
-                      supported,  with the exception of bzip2 which only sup‐
-                      ports values between 1 and 9.   The  interpretation  of
-                      the compression level depends on the chosen compression
-                      method.
+                      The value is interpreted as a decimal integer  specify‐
+                      ing  the compression level.  Values between 0 and 9 are
+                      supported, with the exception of bzip2 which only  sup‐
+                      ports  values  between 1 and 9, and zstd which may sup‐
+                      port negative values depending on the  library  version
+                      and commonly used values 1 through 22.  The interpreta‐
+                      tion  of  the  compression  level depends on the chosen
+                      compression method.
+              1mthreads0m
+                      The value is interpreted as a decimal integer  specify‐
+                      ing  the  number of threads for multi-threaded compres‐
+                      sion (for compressors like zstd that  support  it).  If
+                      set  to 0, an attempt will be made to discover the num‐
+                      ber of CPU cores.
        Format bin
               1mhdrcharset0m
-                      The  value is used as a character set name that will be
+                      The value is used as a character set name that will  be
                       used when translating file names.
        Format gnutar
               1mhdrcharset0m
-                      The value is used as a character set name that will  be
+                      The  value is used as a character set name that will be
                       used when translating file, group and user names.
        Format iso9660 - volume metadata
               These options are used to set standard ISO9660 metadata.
               1mabstract-file22m=4mfilename0m
-                      The  file with the specified name will be identified in
-                      the ISO9660 metadata as holding the abstract  for  this
+                      The file with the specified name will be identified  in
+                      the  ISO9660  metadata as holding the abstract for this
                       volume.  Default: none.
               1mapplication-id22m=4mfilename0m
-                      The  file with the specified name will be identified in
+                      The file with the specified name will be identified  in
                       the ISO9660 metadata as holding the application identi‐
                       fier for this volume.  Default: none.
               1mbiblio-file22m=4mfilename0m
-                      The file with the specified name will be identified  in
-                      the  ISO9660  metadata  as holding the bibliography for
+                      The  file with the specified name will be identified in
+                      the ISO9660 metadata as holding  the  bibliography  for
                       this volume.  Default: none.
               1mcopyright-file22m=4mfilename0m
-                      The file with the specified name will be identified  in
-                      the  ISO9660 metadata as holding the copyright for this
+                      The  file with the specified name will be identified in
+                      the ISO9660 metadata as holding the copyright for  this
                       volume.  Default: none.
               1mpublisher22m=4mfilename0m
-                      The file with the specified name will be identified  in
-                      the  ISO9660 metadata as holding the publisher informa‐
+                      The  file with the specified name will be identified in
+                      the ISO9660 metadata as holding the publisher  informa‐
                       tion for this volume.  Default: none.
               1mvolume-id22m=4mstring0m
                       The specified string will be used as the Volume Identi‐
-                      fier in the ISO9660 metadata.   It  is  limited  to  32
+                      fier  in  the  ISO9660  metadata.   It is limited to 32
                       bytes.  Default: none.
        Format iso9660 - boot support
               These options are used to make an ISO9660 image that can be di‐
               rectly booted on various systems.
               1mboot22m=4mfilename0m
-                      The  file  matching  this  name  will be used as the El
+                      The file matching this name will  be  used  as  the  El
                       Torito boot image file.
               1mboot-catalog22m=4mname0m
                       The name that will be used for the El Torito boot cata‐
                       log.  Default: 4mboot.catalog0m
               1mboot-info-table0m
-                      The boot image file provided by the  1mboot22m=4mfilename24m  op‐
-                      tion  will  be edited with appropriate boot information
+                      The  boot  image file provided by the 1mboot22m=4mfilename24m op‐
+                      tion will be edited with appropriate  boot  information
                       in bytes 8 through 64.  Default: disabled
               1mboot-load-seg22m=4mhexadecimal-number0m
                       The load segment for a no-emulation boot image.
               1mboot-load-size22m=4mdecimal-number0m
-                      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  intelli‐
-                      gent  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
+                      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 intelli‐
+                      gent 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.
               1mboot-type22m=4mvalue0m
                       Specifies the boot semantics used by the El Torito boot
-                      image: If the 4mvalue24m is 1mfd22m, then the boot image  is  as‐
-                      sumed  to  be a bootable floppy image.  If the 4mvalue24m is
-                      1mhd22m, then the boot image is assumed  to  be  a  bootable
-                      hard  disk  image.   If  the 4mvalue24m is 1mno-emulation22m, the
-                      boot image is used without floppy or hard  disk  emula‐
-                      tion.   If  the boot image is exactly 1.2MB, 1.44MB, or
-                      2.88MB, then the default is 1mfd22m, otherwise  the  default
+                      image:  If  the 4mvalue24m is 1mfd22m, then the boot image is as‐
+                      sumed to be a bootable floppy image.  If the  4mvalue24m  is
+                      1mhd22m,  then  the  boot  image is assumed to be a bootable
+                      hard disk image.  If the  4mvalue24m  is  1mno-emulation22m,  the
+                      boot  image  is used without floppy or hard disk emula‐
+                      tion.  If the boot image is exactly 1.2MB,  1.44MB,  or
+                      2.88MB,  then  the default is 1mfd22m, otherwise the default
                       is 1mno-emulation22m.
        Format iso9660 - filename and size extensions
               Various extensions to the base ISO9660 format.
               1mallow-ldots0m
-                      If  enabled,  allows  filenames to begin with a leading
+                      If enabled, allows filenames to begin  with  a  leading
                       period.  If disabled, filenames that begin with a lead‐
-                      ing period will have that period replaced by an  under‐
-                      score  character  in  the  standard  ISO9660 namespace.
-                      This does not impact names stored in the  Rockridge  or
+                      ing  period will have that period replaced by an under‐
+                      score character  in  the  standard  ISO9660  namespace.
+                      This  does  not impact names stored in the Rockridge or
                       Joliet extension area.  Default: disabled.
               1mallow-lowercase0m
                       If enabled, allows filenames to contain lowercase char‐
-                      acters.   If  disabled, filenames will be forced to up‐
-                      percase.  This does not  impact  names  stored  in  the
+                      acters.  If disabled, filenames will be forced  to  up‐
+                      percase.   This  does  not  impact  names stored in the
                       Rockridge or Joliet extension area.  Default: disabled.
               1mallow-multidot0m
                       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.   De‐
+                      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.  De‐
                       fault: disabled.
               1mallow-period0m
                       If enabled, allows filenames to contain trailing period
-                      characters,  in violation of the ISO9660 specification.
-                      If disabled, trailing periods will be converted to  un‐
+                      characters, in violation of the ISO9660  specification.
+                      If  disabled, trailing periods will be converted to un‐
                       derscore characters.  This does not impact names stored
-                      in  the  Rockridge  or Joliet extension area.  Default:
+                      in the Rockridge or Joliet  extension  area.   Default:
                       disabled.
               1mallow-pvd-lowercase0m
-                      If enabled, the Primary Volume Descriptor  may  contain
+                      If  enabled,  the Primary Volume Descriptor may contain
                       lowercase ASCII characters, in violation of the ISO9660
-                      specification.   If  disabled,  characters will be con‐
+                      specification.  If disabled, characters  will  be  con‐
                       verted to uppercase ASCII.  Default: disabled.
               1mallow-sharp-tilde0m
-                      If enabled, sharp and tilde characters will be  permit‐
-                      ted  in filenames, in violation if the ISO9660 specifi‐
+                      If  enabled, sharp and tilde characters will be permit‐
+                      ted in filenames, in violation if the ISO9660  specifi‐
                       cation.  If disabled, such characters will be converted
                       to underscore characters.  Default: disabled.
               1mallow-vernum0m
-                      If enabled,  version  numbers  will  be  included  with
-                      files.   If  disabled,  version  numbers  will  be sup‐
-                      pressed, in violation of the  ISO9660  standard.   This
+                      If  enabled,  version  numbers  will  be  included with
+                      files.  If  disabled,  version  numbers  will  be  sup‐
+                      pressed,  in  violation  of the ISO9660 standard.  This
                       does not impact names stored in the Rockridge or Joliet
                       extension area.  Default: enabled.
               1miso-level0m
                       This enables support for file size and file name exten‐
-                      sions  in  the  core ISO9660 area.  The name extensions
-                      specified here do not affect the names  stored  in  the
+                      sions in the core ISO9660 area.   The  name  extensions
+                      specified  here  do  not affect the names stored in the
                       Rockridge or Joliet extension areas.
                       1miso-level=10m
                               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
+                              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.
                       1miso-level=20m
-                              Filenames  are  limited to 30 uppercase charac‐
-                              ters with a 30-character  extension,  directory
-                              names  are  limited to 30 characters, files are
+                              Filenames are limited to 30  uppercase  charac‐
+                              ters  with  a 30-character extension, directory
+                              names are limited to 30 characters,  files  are
                               limited to 4 GiB.
                       1miso-level=30m
-                              As with 1miso-level=222m, except that files may  ex‐
+                              As  with 1miso-level=222m, except that files may ex‐
                               ceed 4 GiB.
                       1miso-level=40m
-                              As  with 1miso-level=322m, except that filenames may
-                              be up to 193 characters and may  include  arbi‐
+                              As with 1miso-level=322m, except that filenames  may
+                              be  up  to 193 characters and may include arbi‐
                               trary 8-bit characters.
-              1mjoliet  22mMicrosoft's  Joliet extensions store a completely sepa‐
-                      rate set of directory information about each file.   In
+              1mjoliet  22mMicrosoft's Joliet extensions store a completely  sepa‐
+                      rate  set of directory information about each file.  In
                       particular, this information includes Unicode filenames
                       of up to 255 characters.  Default: enabled.
               1mlimit-depth0m
-                      If  enabled,  libarchive  will use directory relocation
-                      records to ensure that no pathname exceeds the  ISO9660
-                      limit  of  8 directory levels.  If disabled, no reloca‐
+                      If enabled, libarchive will  use  directory  relocation
+                      records  to ensure that no pathname exceeds the ISO9660
+                      limit of 8 directory levels.  If disabled,  no  reloca‐
                       tion will occur.  Default: enabled.
               1mlimit-dirs0m
                       If enabled, libarchive will cause an error if there are
-                      more than 65536 directories.  If disabled, there is  no
+                      more  than 65536 directories.  If disabled, there is no
                       limit on the number of directories.  Default: enabled
-              1mpad     22mIf  enabled,  300 kiB of zero bytes will be appended to
+              1mpad     22mIf enabled, 300 kiB of zero bytes will be  appended  to
                       the end of the archive.  Default: enabled
               1mrelaxed-filenames0m
                       If enabled, all 7-bit ASCII characters are permitted in
-                      filenames   (except   lowercase    characters    unless
+                      filenames    (except    lowercase   characters   unless
                       1mallow-lowercase  22mis  also  specified).   This  violates
-                      ISO9660 standards.  This does not impact  names  stored
-                      in  the  Rockridge  or Joliet extension area.  Default:
+                      ISO9660  standards.   This does not impact names stored
+                      in the Rockridge or Joliet  extension  area.   Default:
                       disabled.
               1mrockridge0m
-                      The Rockridge extensions store  an  additional  set  of
-                      POSIX-style  file information with each file, including
-                      mtime, atime, ctime, permissions,  and  long  filenames
+                      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.  De‐
                       fault: enabled.
        Format iso9660 - zisofs support
               The zisofs extensions permit each file to be independently com‐
-              pressed  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 dis‐
+              pressed 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  dis‐
               abled by default.
               1mcompression-level22m=number
-                      The compression level used by the  deflate  compressor.
-                      Ranges  from  0 (least effort) to 9 (most effort).  De‐
+                      The  compression  level used by the deflate compressor.
+                      Ranges from 0 (least effort) to 9 (most  effort).   De‐
                       fault: 6
               1mzisofs  22mSynonym for 1mzisofs=direct22m.
               1mzisofs=direct0m
-                      Compress   each   file   in   the   archive.     Unlike
-                      1mzisofs=indirect22m,   this   is  handled  entirely  within
-                      libarchive and does not  require  a  separate  utility.
-                      For  best  results, libarchive tests each file and will
+                      Compress    each   file   in   the   archive.    Unlike
+                      1mzisofs=indirect22m,  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
+                      will  never  be compressed.  Note that boot image files
                       are never compressed.
               1mzisofs=indirect0m
                       Recognizes files that have already been compressed with
-                      the  1mmkzftree  22mutility  and  sets up the necessary file
-                      metadata so that readers will correctly identify  these
+                      the 1mmkzftree 22mutility and sets  up  the  necessary  file
+                      metadata  so that readers will correctly identify these
                       as zisofs-compressed files.
               1mzisofs-exclude22m=4mfilename0m
                       Specifies a filename that should not be compressed when
-                      using  1mzisofs=direct22m.  This option can be provided mul‐
+                      using 1mzisofs=direct22m.  This option can be provided  mul‐
                       tiple times to suppress compression on many files.
        Format mtree
-              1mcksum22m, 1mdevice22m, 1mflags22m, 1mgid22m,  1mgname22m,  1mindent22m,  1mlink22m,  1mmd522m,  1mmode22m,
-                      1mnlink22m,  1mrmd16022m,  1msha122m,  1msha25622m,  1msha38422m,  1msha51222m, 1msize22m,
+              1mcksum22m,  1mdevice22m,  1mflags22m,  1mgid22m,  1mgname22m,  1mindent22m, 1mlink22m, 1mmd522m, 1mmode22m,
+                      1mnlink22m, 1mrmd16022m,  1msha122m,  1msha25622m,  1msha38422m,  1msha51222m,  1msize22m,
                       1mtime22m, 1muid22m, 1muname0m
-                      Enable a particular keyword in the mtree output.   Pre‐
+                      Enable  a particular keyword in the mtree output.  Pre‐
                       fix with an exclamation mark to disable the correspond‐
-                      ing  keyword.   The  default  is equivalent to “device,
+                      ing keyword.  The default  is  equivalent  to  “device,
                       flags, gid, gname, link, mode, nlink, size, time, type,
                       uid, uname”.
               1mall     22mEnables all of the above keywords.
               1muse-set0m
-                      Enables generation of 1m/set 22mlines that  specify  default
+                      Enables  generation  of 1m/set 22mlines that specify default
                       values for the following files and/or directories.
               1mindent  22mXXX needs explanation XXX
        Format newc
               1mhdrcharset0m
-                      The  value is used as a character set name that will be
+                      The value is used as a character set name that will  be
                       used when translating file names.
        Format odc
               1mhdrcharset0m
-                      The value is used as a character set name that will  be
+                      The  value is used as a character set name that will be
                       used when translating file names.
        Format pwb
               1mhdrcharset0m
-                      The  value is used as a character set name that will be
+                      The value is used as a character set name that will  be
                       used when translating file names.
        Format pax
               1mhdrcharset0m
-                      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
+                      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.
               1mxattrheader0m
-                      When storing extended attributes, this  option  config‐
-                      ures  which headers should be written. The value is one
-                      of “all”, “LIBARCHIVE”, or “SCHILY”.  By default,  both
+                      When  storing  extended attributes, this option config‐
+                      ures which headers should be written. The value is  one
+                      of  “all”, “LIBARCHIVE”, or “SCHILY”.  By default, both
                       “LIBARCHIVE.xattr” and “SCHILY.xattr” headers are writ‐
                       ten.
        Format ustar
               1mhdrcharset0m
-                      The  value is used as a character set name that will be
+                      The value is used as a character set name that will  be
                       used when translating file, group and user names.
        Format v7tar
               1mhdrcharset0m
-                      The value is used as a character set name that will  be
+                      The  value is used as a character set name that will be
                       used when translating file, group and user names.
        Format warc
               1momit-warcinfo0m
@@ -415,72 +423,82 @@
                       Use 4mtype24m as file checksum method.  Supported values are
                       “none”, “md5”, and “sha1” (default).
               1mcompression22m=4mtype0m
-                      Use  4mtype24m  as compression method.  Supported values are
+                      Use 4mtype24m as compression method.  Supported  values  are
                       “none”, “bzip2”, “gzip” (default), “lzma” and “xz”.
               1mcompression_level0m
-                      The value is a decimal integer from 1 to  9  specifying
+                      The  value  is a decimal integer from 1 to 9 specifying
                       the compression level.
               1mtoc-checksum22m=4mtype0m
-                      Use  4mtype24m  as  table of contents checksum method.  Sup‐
+                      Use 4mtype24m as table of contents  checksum  method.   Sup‐
                       ported values are “none”, “md5” and “sha1” (default).
        Format zip
               1mcompression0m
-                      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.
+                      The   value  is  either  “store”,  “deflate”,  “bzip2”,
+                      “lzma”, “xz”, or “zstd” to indicate how  the  following
+                      entries  should  be compressed.  Note that this setting
+                      is ignored for directories, symbolic links,  and  other
+                      special entries.
               1mcompression-level0m
                       The  value is interpreted as a decimal integer specify‐
                       ing the compression level.  Values between 0 and 9  are
                       supported.   A compression level of 0 switches the com‐
                       pression method to “store”, other  values  will  enable
-                      “deflate” compression with the given level.
+                      “deflate”,  “bzip2”,  “lzma”, or “zstd” compression (in
+                      order of priority,  depending  on  what  libraries  are
+                      linked) with the given level.
+              1mthreads0m
+                      The  value is interpreted as a decimal integer specify‐
+                      ing the number of threads to use for  compression.   It
+                      is  supported  only  for “xz” or “zstd” compression and
+                      ignored for any other.  A threads value of 0 is a  spe‐
+                      cial  one  requesting to detect and use as many threads
+                      as the number of active physical CPU cores.
               1mencryption0m
                       Enable encryption using traditional zip encryption.
               1mencryption22m=4mtype0m
-                      Use  4mtype24m  as  encryption  type.   Supported values are
-                      “zipcrypt”  (traditional  zip   encryption),   “aes128”
-                      (WinZip   AES-128   encryption)  and  “aes256”  (WinZip
+                      Use 4mtype24m as  encryption  type.   Supported  values  are
+                      “zipcrypt”   (traditional   zip  encryption),  “aes128”
+                      (WinZip  AES-128  encryption)  and   “aes256”   (WinZip
                       AES-256 encryption).
               1mexperimental0m
-                      This boolean option enables  or  disables  experimental
-                      Zip  features that may not be compatible with other Zip
+                      This  boolean  option  enables or disables experimental
+                      Zip features that may not be compatible with other  Zip
                       implementations.
               1mfakecrc320m
                       This boolean option disables CRC calculations.  All CRC
-                      fields are set to zero.  It should not be  used  except
+                      fields  are  set to zero.  It should not be used except
                       for testing purposes.
               1mhdrcharset0m
-                      The  value is used as a character set name that will be
+                      The value is used as a character set name that will  be
                       used when translating file names.
-              1mzip64   22mZip64 extensions provide additional file size  informa‐
-                      tion  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 se‐
-                      lectively enables these extensions only as needed.   In
+              1mzip64   22mZip64  extensions provide additional file size informa‐
+                      tion 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  se‐
+                      lectively  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 pos‐
                       sibility that the file might be larger than 4 GiB.
 
-                      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
+                      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.
 
-                      Disabling this option with 1m!zip64 22mwill  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
+                      Disabling  this  option  with 1m!zip64 22mwill 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
+                      size.   In  particular,  this can improve compatibility
+                      when generating archives where the entry sizes are  not
                       known in advance.
 
 1mEXAMPLES0m
        The following example creates an archive write handle to create a gzip-
        compressed ISO9660 format image.         The two options here specify that the
-       ISO9660 archive will use 4mkernel.img24m as the boot  image  for         El  Torito
-       booting,         and  that the gzip compressor should use the maximum compres‐
+       ISO9660 archive  will  use  4mkernel.img24m as the boot image for El Torito
+       booting, and that the gzip compressor should use the  maximum  compres‐
        sion level.
 
             a = archive_write_new();
@@ -490,7 +508,7 @@
             archive_write_open_filename(a, filename, blocksize);
 
 1mERRORS0m
-       More detailed error codes and textual descriptions are  available  from
+       More  detailed  error codes and textual descriptions are available from
        the 1marchive_errno22m() and 1marchive_error_string22m() functions.
 
 1mSEE ALSO0m
@@ -500,7 +518,7 @@
        The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3.
 
 1mAUTHORS0m
-       The  options  support  for  libarchive  was  originally implemented by
+       The options  support  for  libarchive  was  originally  implemented  by
        Michihiro NAKAJIMA.
 
 1mBUGS0m
Index: pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt
diff -u pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt:1.9 pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt:1.10
--- pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt:1.9     Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/doc/text/libarchive-formats.5.txt Wed May 21 15:25:50 2025
@@ -242,91 +242,97 @@
 
    1mZip format0m
        Libarchive can read and write zip  format  archives  that  have uncom‐
-       pressed 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.
-
-       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 ordinar‐
+       pressed entries  and  entries compressed with the “deflate” , “LZMA” ,
+       “XZ” , “BZIP2” and “ZSTD” algorithms.  Libarchive can  also  read,  but
+       not  write,  zip         format archives that have entries compressed with the
+       “PPMd” algorithm.  Other zip compression algorithms are not  supported.
+       The  extensions supported by libarchive are Zip64, Libarchive's exten‐
+       sions to better support streaming, PKZIP's traditional ZIP  encryption,
+       Info-ZIP's  Unix extra fields, extra time, and Unicode path, as well as
+       WinZIP's AES encryption.         It can extract  jar  archives,  __MACOSX  re‐
+       source  forks  extension         for  OS  X, 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.
+
+       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  ordinar‐
        ily 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 direc‐
+       streaming  reader.   If the  program using libarchive has enabled seek
+       support, then libarchive will use this to processes the central direc‐
        tory first.
 
-       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  ini‐
+       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 ini‐
        tial program portion, but the seeking reader starts by reading the Cen‐
-       tral  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
+       tral 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.
 
    1mArchive (library) file format0m
-       The Unix archive format (commonly created by the 4mar24m(1) archiver)  is  a
-       general-purpose format  which  is  used  almost exclusively for object
-       files to be read by the link editor 4mld24m(1). The  ar  format  has  never
-       been  standardised.   There are two common variants: the GNU format de‐
-       rived 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 begin‐
+       The  Unix  archive format (commonly created by the 4mar24m(1) archiver) is a
+       general-purpose format which is used  almost  exclusively  for  object
+       files  to  be  read  by the link editor 4mld24m(1).  The ar format has never
+       been standardised.  There are two common variants: the GNU  format  de‐
+       rived  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 begin‐
        ning of the archive; the BSD format stores each long filename in an ex‐
-       tension area  adjacent  to the entry.  Libarchive can read both exten‐
-       sions, including archives that may include both types  of  long  file‐
-       names.  Programs  using  libarchive  can write GNU/SVR4 format if they
-       provide an entry called 4m//24m 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
+       tension area adjacent to the entry.  Libarchive can  read  both exten‐
+       sions,  including  archives  that  may include both types of long file‐
+       names.  Programs using libarchive can write  GNU/SVR4  format  if  they
+       provide an  entry  called 4m//24m containing a filename table to be written
+       into the archive before any of the entries.  Any         entries  whose  names
+       are  not         in  the  filename  table will be written using BSD-style long
        filenames.  This can cause problems for programs such as GNU ld that do
        not support the BSD-style long filenames.
 
    1mmtree0m
        Libarchive can read and write files in 4mmtree24m(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
+       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 key‐
-       words  supported         by  both the NetBSD and FreeBSD versions of 4mmtree24m(8),
-       although many  of  the  keywords         cannot  currently  be  stored  in  an
-       archive_entry  object.  When  writing,  libarchive supports use of the
+       words supported by both the NetBSD and FreeBSD  versions         of  4mmtree24m(8),
+       although         many  of  the  keywords  cannot  currently  be  stored  in an
+       archive_entry object.  When writing, libarchive supports  use  of  the
        4marchive_write_set_options24m(3) interface to specify which keywords should
-       be included in the output.  If libarchive was compiled with  access  to
-       suitable         cryptographic  libraries  (such as the OpenSSL libraries), it
-       can compute hash entries such as 1msha512 22mor 1mmd5  22mfrom  file  data  being
+       be  included  in the output.  If libarchive was compiled with access to
+       suitable cryptographic libraries (such as the  OpenSSL  libraries),  it
+       can  compute  hash  entries  such as 1msha512 22mor 1mmd5 22mfrom file data being
        written to the mtree writer.
 
-       When  reading  an  mtree file, libarchive will locate the corresponding
-       files on disk using the 1mcontents 22mkeyword  if  present  or  the  regular
+       When reading an mtree file, libarchive will  locate  the         corresponding
+       files  on  disk using  the  1mcontents 22mkeyword 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
+       to fill in any metadata that is missing from the mtree  file  and  will
+       read   the  file         contents  and  return  those  to  the  program  using
+       libarchive.  If it cannot locate and open the file on disk,  libarchive
        will return an error for any attempt to read the entry body.
 
    1m7-Zip0m
-       Libarchive can read and write 7-Zip format archives.  TODO:  Need  more
+       Libarchive  can read and write 7-Zip format archives.  TODO: Need more
        information
 
    1mCAB0m
-       Libarchive  can read Microsoft Cabinet ( “CAB”) format archives.         TODO:
+       Libarchive can read Microsoft Cabinet ( “CAB”) format archives.  TODO:
        Need more information.
 
    1mLHA0m
        TODO: Information about libarchive's LHA support
 
    1mRAR0m
-       Libarchive has limited support for reading RAR format  archives.          Cur‐
-       rently, libarchive  can read RARv3 format archives which have been ei‐
-       ther created uncompressed, or compressed using any of  the  compression
-       methods supported by the RARv3 format.  Libarchive can also read self-
+       Libarchive  has limited support for reading RAR format archives.  Cur‐
+       rently, libarchive can read RARv3 format archives which have  been  ei‐
+       ther  created  uncompressed, or compressed using any of the compression
+       methods supported by the RARv3 format.  Libarchive can also read         self-
        extracting RAR archives.
 
    1mWarc0m
@@ -334,11 +340,11 @@
        tion
 
    1mXAR0m
-       Libarchive can read and write the XAR format used by many Apple tools.
+       Libarchive  can read and write the XAR format used by many Apple tools.
        TODO: Need more information
 
 1mSEE ALSO0m
-       4mar24m(1),  4mcpio24m(1), 4mmkisofs24m(1), 4mshar24m(1), 4mtar24m(1), 4mzip24m(1), 4mzlib24m(3), 4mcpio24m(5),
+       4mar24m(1), 4mcpio24m(1), 4mmkisofs24m(1), 4mshar24m(1), 4mtar24m(1), 4mzip24m(1), 4mzlib24m(3),         4mcpio24m(5),
        4mmtree24m(5), 4mtar24m(5)
 
 Debian                        December 27, 2016         4mLIBARCHIVE-FORMATS24m(5)

Index: pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt
diff -u pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt:1.13 pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt:1.14
--- pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt:1.13        Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/doc/text/bsdtar.1.txt     Wed May 21 15:25:50 2025
@@ -127,64 +127,68 @@
               (x  mode only) 1mchroot22m() to the current directory after process‐
               ing any 1m-C 22moptions and before extracting any files.
 
+       1m--clamp-mtime0m
+              (use with 1m--mtime22m) Only set the modification time if  the  file
+              is newer than the date specified in 1m--mtime22m.
+
        1m--clear-nochange-fflags0m
-              (x mode only) Before removing file system  objects  to  replace
-              them,  clear  platform-specific  file  attributes or file flags
+              (x  mode  only)  Before removing file system objects to replace
+              them, clear platform-specific file  attributes  or  file  flags
               that might prevent removal.
 
        1m--exclude 4m22mpattern0m
-              Do not process files or directories that  match  the  specified
+              Do  not  process  files or directories that match the specified
               pattern.  Note that exclusions take precedence over patterns or
               filenames specified on the command line.
 
        1m--exclude-vcs0m
               Do not process files or directories internally used by the ver‐
-              sion   control   systems   ‘Arch’,  ‘Bazaar’,  ‘CVS’,  ‘Darcs’,
+              sion  control  systems  ‘Arch’,   ‘Bazaar’,   ‘CVS’,   ‘Darcs’,
               ‘Mercurial’, ‘RCS’, ‘SCCS’, ‘SVN’ and ‘git’.
 
        1m--fflags0m
-              (c, r, u, x modes only) Archive  or  extract  platform-specific
+              (c,  r,  u,  x modes only) Archive or extract platform-specific
               file  attributes  or  file  flags.   This  is  the  reverse  of
               1m--no-fflags 22mand the default behavior in c, r, and u modes or if
               1mtar 22mis run in x mode as root.
 
        1m--format 4m22mformat0m
-              (c, r, u mode only) Use the specified format  for  the  created
-              archive.   Supported formats include “cpio”, “pax”, “shar”, and
-              “ustar”.   Other   formats   may   also   be   supported;   see
+              (c,  r,  u  mode only) Use the specified format for the created
+              archive.  Supported formats include “cpio”, “pax”, “shar”,  and
+              “ustar”.    Other   formats   may   also   be   supported;  see
               4mlibarchive-formats24m(5) for more information about currently-sup‐
-              ported  formats.   In r and u modes, when extending an existing
-              archive, the format specified here must be compatible with  the
+              ported formats.  In r and u modes, when extending  an  existing
+              archive,  the format specified here must be compatible with the
               format of the existing archive on disk.
 
        1m-f 4m22mfile24m, 1m--file 4m22mfile0m
-              Read  the  archive  from  or write the archive to the specified
-              file.  The filename can be 4m-24m for  standard  input  or  standard
-              output.   The default varies by system; on FreeBSD, the default
+              Read the archive from or write the  archive  to  the  specified
+              file.   The  filename  can  be 4m-24m for standard input or standard
+              output.  The default varies by system; on FreeBSD, the  default
               is 4m/dev/sa024m; on Linux, the default is 4m/dev/st024m.
 
        1m--gid 4m22mid0m
-              Use the provided group id number.  On extract,  this  overrides
+              Use  the  provided group id number.  On extract, this overrides
               the group id in the archive; the group name in the archive will
-              be  ignored.   On create, this overrides the group id read from
-              disk; if 1m--gname 22mis not also specified, the group name will  be
+              be ignored.  On create, this overrides the group id  read  from
+              disk;  if 1m--gname 22mis not also specified, the group name will be
               set to match the group id.
 
        1m--gname 4m22mname0m
-              Use  the  provided  group name.  On extract, this overrides the
-              group name in the archive; if the provided group name does  not
+              Use the provided group name.  On extract,  this  overrides  the
+              group  name in the archive; if the provided group name does not
               exist on the system, the group id (from the archive or from the
-              1m--gid  22moption)  will be used instead.  On create, this sets the
-              group name that will be stored in the archive;  the  name  will
+              1m--gid 22moption) will be used instead.  On create, this  sets  the
+              group  name  that  will be stored in the archive; the name will
               not be verified against the system group database.
 
        1m--group 4m22mname24m[:4mgid24m]
               Use the provided group, if 4mgid24m is not provided, 4mname24m can be ei‐
-              ther  a  group  name or numeric id.  See the 1m--gname 22moption for
+              ther a group name or numeric id.  See the  1m--gname  22moption  for
               details.
 
-       1m-H     22m(c and r modes only) Symbolic links named on the  command  line
-              will  be followed; the target of the link will be archived, not
+       1m-H     22m(c  and  r modes only) Symbolic links named on the command line
+              will be followed; the target of the link will be archived,  not
               the link itself.
 
        1m-h     22m(c and r modes only) Synonym for 1m-L22m.
@@ -194,97 +198,101 @@
        1m--help         22mShow usage.
 
        1m--hfsCompression0m
-              (x mode only) Mac OS X specific (v10.6 or later). Compress  ex‐
+              (x  mode only) Mac OS X specific (v10.6 or later). Compress ex‐
               tracted regular files with HFS+ compression.
 
        1m--ignore-zeros0m
-              An  alias  of 1m--options read_concatenated_archives 22mfor compati‐
+              An alias of 1m--options read_concatenated_archives  22mfor  compati‐
               bility with GNU tar.
 
        1m--include 4m22mpattern0m
               Process only files or directories that match the specified pat‐
-              tern.  Note  that  exclusions  specified  with  1m--exclude  22mtake
-              precedence  over  inclusions.   If no inclusions are explicitly
+              tern.   Note  that  exclusions  specified  with  1m--exclude 22mtake
+              precedence over inclusions.  If no  inclusions  are  explicitly
               specified, all entries are processed by default.  The 1m--include0m
               option is especially useful when filtering archives.  For exam‐
               ple, the command
 
                     1mtar -c -f 4m22mnew.tar24m 1m--include='*foo*' @4m22mold.tgz0m
 
-              creates a new archive 4mnew.tar24m containing only the entries  from
+              creates  a new archive 4mnew.tar24m containing only the entries from
               4mold.tgz24m containing the string ‘foo’.
 
        1m-J22m, 1m--xz0m
-              (c  mode  only)  Compress the resulting archive with 4mxz24m(1).  In
-              extract or list modes, this option is ignored.  Note that  this
+              (c mode only) Compress the resulting archive  with  4mxz24m(1).   In
+              extract  or list modes, this option is ignored.  Note that this
               1mtar 22mimplementation recognizes XZ compression automatically when
               reading archives.
 
        1m-j22m, 1m--bzip22m, 1m--bzip222m, 1m--bunzip20m
               (c mode only) Compress the resulting archive with 4mbzip224m(1).  In
-              extract  or list modes, this option is ignored.  Note that this
-              1mtar 22mimplementation recognizes bzip2  compression  automatically
+              extract or list modes, this option is ignored.  Note that  this
+              1mtar  22mimplementation  recognizes bzip2 compression automatically
               when reading archives.
 
        1m-k22m, 1m--keep-old-files0m
-              (x  mode only) Do not overwrite existing files.  In particular,
-              if a file appears more than once in an  archive,  later  copies
+              (x mode only) Do not overwrite existing files.  In  particular,
+              if  a  file  appears more than once in an archive, later copies
               will not overwrite earlier copies.
 
        1m--keep-newer-files0m
-              (x  mode  only)  Do not overwrite existing files that are newer
+              (x mode only) Do not overwrite existing files  that  are  newer
               than the versions appearing in the archive being extracted.
 
        1m-L22m, 1m--dereference0m
               (c and r modes only) All symbolic links will be followed.  Nor‐
-              mally, symbolic links are archived as such.  With this  option,
+              mally,  symbolic links are archived as such.  With this option,
               the target of the link will be archived instead.
 
        1m-l22m, 1m--check-links0m
-              (c  and  r modes only) Issue a warning message unless all links
+              (c and r modes only) Issue a warning message unless  all  links
               to each file are archived.
 
        1m--lrzip0m
               (c mode only) Compress the resulting archive with 4mlrzip24m(1).  In
-              extract or list modes, this option is ignored.  Note that  this
-              1mtar  22mimplementation  recognizes lrzip compression automatically
+              extract  or list modes, this option is ignored.  Note that this
+              1mtar 22mimplementation recognizes lrzip  compression  automatically
               when reading archives.
 
        1m--lz4  22m(c mode only) Compress the archive with lz4-compatible compres‐
-              sion before writing it.  In extract or list modes, this  option
-              is  ignored.   Note that this 1mtar 22mimplementation recognizes lz4
+              sion  before writing it.  In extract or list modes, this option
+              is ignored.  Note that this 1mtar 22mimplementation  recognizes  lz4
               compression automatically when reading archives.
 
-       1m--zstd         22m(c mode only) Compress the archive  with  zstd-compatible  com‐
+       1m--zstd         22m(c  mode  only)  Compress the archive with zstd-compatible com‐
               pression before writing it.  In extract or list modes, this op‐
-              tion  is ignored.  Note that this 1mtar 22mimplementation recognizes
+              tion is ignored.  Note that this 1mtar 22mimplementation  recognizes
               zstd compression automatically when reading archives.
 
-       1m--lzma         22m(c mode only) Compress the resulting archive with the  original
-              LZMA  algorithm.   In extract or list modes, this option is ig‐
-              nored.  Use of this option  is  discouraged  and  new  archives
+       1m--lzma         22m(c  mode only) Compress the resulting archive with the original
+              LZMA algorithm.  In extract or list modes, this option  is  ig‐
+              nored.   Use  of  this  option  is discouraged and new archives
               should be created with 1m--xz 22minstead.  Note that this 1mtar 22mimple‐
-              mentation  recognizes LZMA compression automatically when read‐
+              mentation recognizes LZMA compression automatically when  read‐
               ing archives.
 
-       1m--lzop         22m(c mode only) Compress the resulting archive with 4mlzop24m(1).   In
-              extract  or list modes, this option is ignored.  Note that this
-              1mtar 22mimplementation  recognizes  LZO  compression  automatically
+       1m--lzop         22m(c  mode only) Compress the resulting archive with 4mlzop24m(1).  In
+              extract or list modes, this option is ignored.  Note that  this
+              1mtar  22mimplementation  recognizes  LZO  compression automatically
               when reading archives.
 
        1m-m22m, 1m--modification-time0m
-              (x  mode  only)  Do not extract modification time.  By default,
+              (x mode only) Do not extract modification  time.   By  default,
               the modification time is set to the time stored in the archive.
 
        1m--mac-metadata0m
-              (c, r, u and x mode only) Mac OS X specific.   Archive  or  ex‐
-              tract   extended   ACLs  and  extended  file  attributes  using
-              4mcopyfile24m(3) in AppleDouble format.   This  is  the  reverse  of
-              1m--no-mac-metadata22m.   and  the  default  behavior in c, r, and u
-              modes or if 1mtar 22mis run in x mode as root.  Currently  supported
+              (c,  r,  u  and x mode only) Mac OS X specific.  Archive or ex‐
+              tract  extended  ACLs  and  extended  file   attributes   using
+              4mcopyfile24m(3)  in  AppleDouble  format.   This  is the reverse of
+              1m--no-mac-metadata22m.  and the default behavior in  c,  r,  and  u
+              modes  or if 1mtar 22mis run in x mode as root.  Currently supported
               only for pax formats (including pax restricted, the default tar
               format for 1mbsdtar22m)
 
+       1m--mtime 4m22mdate0m
+              (c, r, u modes only) Set the modification times of added  files
+              to the specified date.
+
        1m-n22m, 1m--norecurse22m, 1m--no-recursion0m
               Do not operate recursively on the content of directories.
 
@@ -330,10 +338,10 @@
               default behavior if 1mtar 22mis run as non-root in x mode.
 
        1m--no-mac-metadata0m
-              (x mode only) Mac OS X specific.  Do  not  archive  or  extract
-              ACLs  and  extended file attributes using 4mcopyfile24m(3) in Apple‐
-              Double format.  This is the reverse of 1m--mac-metadata22m.  and the
-              default behavior if 1mtar 22mis run as non-root in x mode.
+              (c, r, u and x mode only) Mac OS X specific.  Do not archive or
+              extract ACLs and extended file attributes using 4mcopyfile24m(3)  in
+              AppleDouble  format.   This  is  the reverse of 1m--mac-metadata22m.
+              and the default behavior if 1mtar 22mis run as non-root in x mode.
 
        1m--no-read-sparse0m
               (c, r, u modes only) Do not read sparse file  information  from

Index: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki
diff -u pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki:1.7 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki:1.8
--- pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki:1.7       Thu Jan 18 18:00:17 2024
+++ pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveReadFormat3.wiki   Wed May 21 15:25:50 2025
@@ -11,8 +11,10 @@ ARCHIVE_READ_FORMAT(3) manual page 
 '''archive_read_support_format_lha''', 
 '''archive_read_support_format_mtree''', 
 '''archive_read_support_format_rar''', 
+'''archive_read_support_format_rar5''', 
 '''archive_read_support_format_raw''', 
 '''archive_read_support_format_tar''', 
+'''archive_read_support_format_warc''', 
 '''archive_read_support_format_xar''', 
 '''archive_read_support_format_zip''' 
 - functions for reading streaming archives 
@@ -67,6 +69,10 @@ Streaming Archive Library (libarchive, -
 <br> 
 ''int'' 
 <br> 
+'''archive_read_support_format_rar5'''(''struct archive *''); 
+<br> 
+''int'' 
+<br> 
 '''archive_read_support_format_raw'''(''struct archive *''); 
 <br> 
 ''int'' 
@@ -75,6 +81,10 @@ Streaming Archive Library (libarchive, -
 <br> 
 ''int'' 
 <br> 
+'''archive_read_support_format_warc'''(''struct archive *''); 
+<br> 
+''int'' 
+<br> 
 '''archive_read_support_format_xar'''(''struct archive *''); 
 <br> 
 ''int'' 
@@ -91,8 +101,10 @@ Streaming Archive Library (libarchive, -
 '''archive_read_support_format_lha'''(), 
 '''archive_read_support_format_mtree'''(), 
 '''archive_read_support_format_rar'''(), 
+'''archive_read_support_format_rar5'''(), 
 '''archive_read_support_format_raw'''(), 
 '''archive_read_support_format_tar'''(), 
+'''archive_read_support_format_warc'''(), 
 '''archive_read_support_format_xar'''(), 
 '''archive_read_support_format_zip'''() 
 </dt> <dd> 
@@ -102,6 +114,12 @@ For example, 
 '''archive_read_support_format_tar'''() 
 enables support for a variety of standard tar formats, old-style tar, 
 ustar, pax interchange format, and many common variants. 
+'''archive_read_support_format_zip'''() 
+enables support for both the streaming and the seeking zip readers, 
+which can separately be enabled by respectively 
+'''archive_read_support_format_zip_streamable'''() 
+and 
+'''archive_read_support_format_zip_seekable'''() 
 </dd><dt>'''archive_read_support_format_all'''()</dt><dd> 
 Enables support for all available formats except the 
 "raw" 

Index: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki
diff -u pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki:1.8 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki:1.9
--- pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki:1.8  Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/doc/wiki/ManPageArchiveWriteSetOptions3.wiki      Wed May 21 15:25:50 2025
@@ -224,7 +224,7 @@ decimal integer specifying log2 window s
 The value is interpreted as a decimal integer specifying the 
 number of threads for multi-threaded zstd compression. 
 If set to 0, zstd will attempt to detect and use the number 
-of physical CPU cores. 
+of active physical CPU cores. 
 </dd></dl> 
 </dd><dt>Format 7zip</dt><dd> 
 <dl> 
@@ -235,9 +235,10 @@ The value is one of 
 "deflate", 
 "bzip2", 
 "lzma1", 
-"lzma2" 
+"lzma2", 
+"ppmd", 
 or 
-"ppmd" 
+"zstd" 
 to indicate how the following entries should be compressed. 
 The values 
 "store" 
@@ -250,9 +251,16 @@ and other special entries. 
 The value is interpreted as a decimal integer specifying the 
 compression level. 
 Values between 0 and 9 are supported, with the exception of bzip2 
-which only supports values between 1 and 9. 
+which only supports values between 1 and 9, and zstd which may 
+support negative values depending on the library version and 
+commonly used values 1 through 22. 
 The interpretation of the compression level depends on the chosen 
 compression method. 
+</dd><dt>'''threads'''</dt><dd> 
+The value is interpreted as a decimal integer specifying the 
+number of threads for multi-threaded compression (for compressors 
+like zstd that support it). If set to 0, an attempt will be made 
+to discover the number of CPU cores. 
 </dd></dl> 
 </dd><dt>Format bin</dt><dd> 
 <dl> 
@@ -593,9 +601,13 @@ and 
 <dl> 
 <dt>'''compression'''</dt><dd> 
 The value is either 
-"store" 
+"store", 
+"deflate", 
+"bzip2", 
+"lzma", 
+"xz", 
 or 
-"deflate" 
+"zstd" 
 to indicate how the following entries should be compressed. 
 Note that this setting is ignored for directories, symbolic links, 
 and other special entries. 
@@ -606,8 +618,23 @@ 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. 
+"deflate", 
+"bzip2", 
+"lzma", 
+or 
+"zstd" 
+compression (in order of priority, depending on what libraries  
+are linked) with the given level. 
+</dd><dt>'''threads'''</dt><dd> 
+The value is interpreted as a decimal integer specifying the 
+number of threads to use for compression. 
+It is supported only for 
+"xz" 
+or 
+"zstd" 
+compression and ignored for any other. 
+A threads value of 0 is a special one requesting to detect and use as 
+many threads as the number of active physical CPU cores. 
 </dd><dt>'''encryption'''</dt><dd> 
 Enable encryption using traditional zip encryption. 
 </dd><dt>'''encryption'''=''type''</dt><dd> 
Index: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki
diff -u pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki:1.8 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki:1.9
--- pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki:1.8       Thu Jan 18 18:00:17 2024
+++ pkgsrc/archivers/libarchive/files/doc/wiki/ManPageLibarchiveFormats5.wiki   Wed May 21 15:25:50 2025
@@ -301,10 +301,26 @@ by the usual environment variables. 
 Libarchive can read and write zip format archives that have 
 uncompressed entries and entries compressed with the 
 "deflate" 
+, 
+"LZMA" 
+, 
+"XZ" 
+, 
+"BZIP2" 
+and 
+"ZSTD" 
+algorithms. 
+Libarchive can also read, but not write, zip format archives that 
+have entries compressed with the 
+"PPMd" 
 algorithm. 
 Other zip compression algorithms are not supported. 
-It can extract jar archives, archives that use Zip64 extensions and 
-self-extracting zip archives. 
+The extensions supported by libarchive are Zip64, Libarchive's 
+extensions to better support streaming, PKZIP's traditional 
+ZIP encryption, Info-ZIP's Unix extra fields, extra time, and 
+Unicode path, as well as WinZIP's AES encryption. 
+It can extract jar archives, __MACOSX resource forks extension 
+for OS X, 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 

Index: pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki
diff -u pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki:1.12 pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki:1.13
--- pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki:1.12 Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/doc/wiki/ManPageBsdtar1.wiki      Wed May 21 15:25:50 2025
@@ -207,6 +207,11 @@ but before extracting entries from the a
 to the current directory after processing any 
 -C 
 options and before extracting any files. 
+</dd><dt>--clamp-mtime</dt><dd> 
+(use with 
+--mtime) 
+Only set the modification time if the file is newer than the date specified in 
+--mtime. 
 </dd><dt>--clear-nochange-fflags</dt><dd> 
 (x mode only) 
 Before removing file system objects to replace them, clear platform-specific 
@@ -429,6 +434,9 @@ is run in x mode as root. 
 Currently supported only for pax formats 
 Po including pax restricted, the default tar format for 
 '''bsdtar''' Pc 
+</dd><dt>--mtime ''date''</dt><dd> 
+(c, r, u modes only) 
+Set the modification times of added files to the specified date. 
 </dd><dt>-n, --norecurse, --no-recursion</dt><dd> 
 Do not operate recursively on the content of directories. 
 </dd><dt>--newer ''date''</dt><dd> 
@@ -485,7 +493,7 @@ and the default behavior if 
 '''tar''' 
 is run as non-root in x mode. 
 </dd><dt>--no-mac-metadata</dt><dd> 
-(x mode only) 
+(c, r, u and x mode only) 
 Mac OS X specific. 
 Do not archive or extract ACLs and extended file attributes 
 using 

Index: pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt
diff -u pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt:1.11 pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt:1.12
--- pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt:1.11    Sun Sep 15 07:02:20 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/CMakeLists.txt Wed May 21 15:25:50 2025
@@ -38,8 +38,6 @@ SET(libarchive_SOURCES
   archive_entry_stat.c
   archive_entry_strmode.c
   archive_entry_xattr.c
-  archive_getdate.c
-  archive_getdate.h
   archive_hmac.c
   archive_hmac_private.h
   archive_match.c
@@ -49,6 +47,7 @@ SET(libarchive_SOURCES
   archive_options_private.h
   archive_pack_dev.h
   archive_pack_dev.c
+  archive_parse_date.c
   archive_pathmatch.c
   archive_pathmatch.h
   archive_platform.h
@@ -117,6 +116,8 @@ SET(libarchive_SOURCES
   archive_string.h
   archive_string_composition.h
   archive_string_sprintf.c
+  archive_time.c
+  archive_time_private.h
   archive_util.c
   archive_version_details.c
   archive_virtual.c
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_posix.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_posix.c:1.11 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_posix.c:1.12
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_posix.c:1.11 Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_posix.c      Wed May 21 15:25:51 2025
@@ -276,7 +276,7 @@ tree_dir_next_posix(struct tree *t);
 #endif
 
 /* Initiate/terminate a tree traversal. */
-static struct tree *tree_open(const char *, int, int);
+static struct tree *tree_open(const char *, char, int);
 static struct tree *tree_reopen(struct tree *, const char *, int);
 static void tree_close(struct tree *);
 static void tree_free(struct tree *);
@@ -514,7 +514,7 @@ _archive_read_close(struct archive *_a)
 
 static void
 setup_symlink_mode(struct archive_read_disk *a, char symlink_mode,
-    int follow_symlinks)
+    char follow_symlinks)
 {
        a->symlink_mode = symlink_mode;
        a->follow_symlinks = follow_symlinks;
@@ -778,7 +778,8 @@ _archive_read_data_block(struct archive 
         */
        if (t->current_sparse->offset > t->entry_total) {
                if (lseek(t->entry_fd,
-                   (off_t)t->current_sparse->offset, SEEK_SET) < 0) {
+                   (off_t)t->current_sparse->offset, SEEK_SET) !=
+                   t->current_sparse->offset) {
                        archive_set_error(&a->archive, errno, "Seek error");
                        r = ARCHIVE_FATAL;
                        a->archive.state = ARCHIVE_STATE_FATAL;
@@ -2180,7 +2181,7 @@ tree_append(struct tree *t, const char *
  * Open a directory tree for traversal.
  */
 static struct tree *
-tree_open(const char *path, int symlink_mode, int restore_time)
+tree_open(const char *path, char symlink_mode, int restore_time)
 {
        struct tree *t;
 
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c:1.11 pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c:1.12
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c:1.11      Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_filename.c   Wed May 21 15:25:51 2025
@@ -74,6 +74,7 @@ struct read_file_data {
        size_t   block_size;
        void    *buffer;
        mode_t   st_mode;  /* Mode bits for opened file. */
+       int64_t  size;
        char     use_lseek;
        enum fnt_e { FNT_STDIN, FNT_MBS, FNT_WCS } filename_type;
        union {
@@ -400,8 +401,10 @@ file_open(struct archive *a, void *clien
        mine->st_mode = st.st_mode;
 
        /* Disk-like inputs can use lseek(). */
-       if (is_disk_like)
+       if (is_disk_like) {
                mine->use_lseek = 1;
+               mine->size = st.st_size;
+       }
 
        return (ARCHIVE_OK);
 fail:
@@ -479,21 +482,30 @@ file_skip_lseek(struct archive *a, void 
        struct read_file_data *mine = (struct read_file_data *)client_data;
 #if defined(_WIN32) && !defined(__CYGWIN__)
        /* We use _lseeki64() on Windows. */
-       int64_t old_offset, new_offset;
+       int64_t old_offset, new_offset, skip = request;
 #else
-       off_t old_offset, new_offset;
+       off_t old_offset, new_offset, skip = (off_t)request;
 #endif
+       int skip_bits = sizeof(skip) * 8 - 1;
 
        /* We use off_t here because lseek() is declared that way. */
 
-       /* TODO: Deal with case where off_t isn't 64 bits.
-        * This shouldn't be a problem on Linux or other POSIX
-        * systems, since the configuration logic for libarchive
-        * tries to obtain a 64-bit off_t.
-        */
-       if ((old_offset = lseek(mine->fd, 0, SEEK_CUR)) >= 0 &&
-           (new_offset = lseek(mine->fd, request, SEEK_CUR)) >= 0)
-               return (new_offset - old_offset);
+       /* Reduce a request that would overflow the 'skip' variable. */
+       if (sizeof(request) > sizeof(skip)) {
+               const int64_t max_skip =
+                   (((int64_t)1 << (skip_bits - 1)) - 1) * 2 + 1;
+               if (request > max_skip)
+                       skip = max_skip;
+       }
+
+       if ((old_offset = lseek(mine->fd, 0, SEEK_CUR)) >= 0) {
+               if (old_offset >= mine->size ||
+                   skip > mine->size - old_offset) {
+                       /* Do not seek past end of file. */
+                       errno = ESPIPE;
+               } else if ((new_offset = lseek(mine->fd, skip, SEEK_CUR)) >= 0)
+                       return (new_offset - old_offset);
+       }
 
        /* If lseek() fails, don't bother trying again. */
        mine->use_lseek = 0;
@@ -540,11 +552,24 @@ static int64_t
 file_seek(struct archive *a, void *client_data, int64_t request, int whence)
 {
        struct read_file_data *mine = (struct read_file_data *)client_data;
+       off_t seek = (off_t)request;
        int64_t r;
+       int seek_bits = sizeof(seek) * 8 - 1;
 
        /* We use off_t here because lseek() is declared that way. */
-       /* See above for notes about when off_t is less than 64 bits. */
-       r = lseek(mine->fd, request, whence);
+
+       /* Reduce a request that would overflow the 'seek' variable. */
+       if (sizeof(request) > sizeof(seek)) {
+               const int64_t max_seek =
+                   (((int64_t)1 << (seek_bits - 1)) - 1) * 2 + 1;
+               const int64_t min_seek = ~max_seek;
+               if (request > max_seek)
+                       seek = (off_t)max_seek;
+               else if (request < min_seek)
+                       seek = (off_t)min_seek;
+       }
+
+       r = lseek(mine->fd, seek, whence);
        if (r >= 0)
                return r;
 
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c:1.11 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c:1.12
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c:1.11 Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_lha.c      Wed May 21 15:25:51 2025
@@ -43,6 +43,7 @@
 #include "archive_entry_locale.h"
 #include "archive_private.h"
 #include "archive_read_private.h"
+#include "archive_time_private.h"
 #include "archive_endian.h"
 
 
@@ -162,12 +163,12 @@ struct lha {
 #define ATIME_IS_SET           2
 #define UNIX_MODE_IS_SET       4
 #define CRC_IS_SET             8
-       time_t                   birthtime;
-       long                     birthtime_tv_nsec;
-       time_t                   mtime;
-       long                     mtime_tv_nsec;
-       time_t                   atime;
-       long                     atime_tv_nsec;
+       int64_t                  birthtime;
+       uint32_t                 birthtime_tv_nsec;
+       int64_t                  mtime;
+       uint32_t                 mtime_tv_nsec;
+       int64_t                  atime;
+       uint32_t                 atime_tv_nsec;
        mode_t                   mode;
        int64_t                  uid;
        int64_t                  gid;
@@ -230,8 +231,6 @@ static int  lha_read_file_extended_header
                    struct lha *, uint16_t *, int, uint64_t, size_t *);
 static size_t  lha_check_header_format(const void *);
 static int     lha_skip_sfx(struct archive_read *);
-static time_t  lha_dos_time(const unsigned char *);
-static time_t  lha_win_time(uint64_t, long *);
 static unsigned char   lha_calcsum(unsigned char, const void *,
                    int, size_t);
 static int     lha_parse_linkname(struct archive_wstring *,
@@ -819,7 +818,7 @@ lha_read_file_header_0(struct archive_re
        headersum = p[H0_HEADER_SUM_OFFSET];
        lha->compsize = archive_le32dec(p + H0_COMP_SIZE_OFFSET);
        lha->origsize = archive_le32dec(p + H0_ORIG_SIZE_OFFSET);
-       lha->mtime = lha_dos_time(p + H0_DOS_TIME_OFFSET);
+       lha->mtime = dos_to_unix(archive_le32dec(p + H0_DOS_TIME_OFFSET));
        namelen = p[H0_NAME_LEN_OFFSET];
        extdsize = (int)lha->header_size - H0_FIXED_SIZE - namelen;
        if ((namelen > 221 || extdsize < 0) && extdsize != -2) {
@@ -919,7 +918,7 @@ lha_read_file_header_1(struct archive_re
        /* Note: An extended header size is included in a compsize. */
        lha->compsize = archive_le32dec(p + H1_COMP_SIZE_OFFSET);
        lha->origsize = archive_le32dec(p + H1_ORIG_SIZE_OFFSET);
-       lha->mtime = lha_dos_time(p + H1_DOS_TIME_OFFSET);
+       lha->mtime = dos_to_unix(archive_le32dec(p + H1_DOS_TIME_OFFSET));
        namelen = p[H1_NAME_LEN_OFFSET];
        /* Calculate a padding size. The result will be normally 0 only(?) */
        padding = ((int)lha->header_size) - H1_FIXED_SIZE - namelen;
@@ -1090,7 +1089,7 @@ lha_read_file_header_3(struct archive_re
 
        if (archive_le16dec(p + H3_FIELD_LEN_OFFSET) != 4)
                goto invalid;
-       lha->header_size =archive_le32dec(p + H3_HEADER_SIZE_OFFSET);
+       lha->header_size = archive_le32dec(p + H3_HEADER_SIZE_OFFSET);
        lha->compsize = archive_le32dec(p + H3_COMP_SIZE_OFFSET);
        lha->origsize = archive_le32dec(p + H3_ORIG_SIZE_OFFSET);
        lha->mtime = archive_le32dec(p + H3_TIME_OFFSET);
@@ -1326,16 +1325,16 @@ lha_read_file_extended_header(struct arc
                        break;
                case EXT_TIMESTAMP:
                        if (datasize == (sizeof(uint64_t) * 3)) {
-                               lha->birthtime = lha_win_time(
-                                   archive_le64dec(extdheader),
+                               ntfs_to_unix(archive_le64dec(extdheader),
+                                       &lha->birthtime,
                                    &lha->birthtime_tv_nsec);
                                extdheader += sizeof(uint64_t);
-                               lha->mtime = lha_win_time(
-                                   archive_le64dec(extdheader),
+                               ntfs_to_unix(archive_le64dec(extdheader),
+                                       &lha->mtime,
                                    &lha->mtime_tv_nsec);
                                extdheader += sizeof(uint64_t);
-                               lha->atime = lha_win_time(
-                                   archive_le64dec(extdheader),
+                               ntfs_to_unix(archive_le64dec(extdheader),
+                                       &lha->atime,
                                    &lha->atime_tv_nsec);
                                lha->setflag |= BIRTHTIME_IS_SET |
                                    ATIME_IS_SET;
@@ -1716,45 +1715,6 @@ lha_parse_linkname(struct archive_wstrin
        return (0);
 }
 
-/* Convert an MSDOS-style date/time into Unix-style time. */
-static time_t
-lha_dos_time(const unsigned char *p)
-{
-       int msTime, msDate;
-       struct tm ts;
-
-       msTime = archive_le16dec(p);
-       msDate = archive_le16dec(p+2);
-
-       memset(&ts, 0, sizeof(ts));
-       ts.tm_year = ((msDate >> 9) & 0x7f) + 80;   /* Years since 1900. */
-       ts.tm_mon = ((msDate >> 5) & 0x0f) - 1;     /* Month number.     */
-       ts.tm_mday = msDate & 0x1f;                 /* Day of month.     */
-       ts.tm_hour = (msTime >> 11) & 0x1f;
-       ts.tm_min = (msTime >> 5) & 0x3f;
-       ts.tm_sec = (msTime << 1) & 0x3e;
-       ts.tm_isdst = -1;
-       return (mktime(&ts));
-}
-
-/* Convert an MS-Windows-style date/time into Unix-style time. */
-static time_t
-lha_win_time(uint64_t wintime, long *ns)
-{
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
-
-       if (wintime >= EPOC_TIME) {
-               wintime -= EPOC_TIME;   /* 1970-01-01 00:00:00 (UTC) */
-               if (ns != NULL)
-                       *ns = (long)(wintime % 10000000) * 100;
-               return (wintime / 10000000);
-       } else {
-               if (ns != NULL)
-                       *ns = 0;
-               return (0);
-       }
-}
-
 static unsigned char
 lha_calcsum(unsigned char sum, const void *pp, int offset, size_t size)
 {
@@ -2917,4 +2877,3 @@ lzh_decode_huffman(struct huffman *hf, u
        /* This bit pattern needs to be found out at a huffman tree. */
        return (lzh_decode_huffman_tree(hf, rbits, c));
 }
-
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h:1.11 pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h:1.12
--- pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h:1.11 Sun Sep 15 07:02:21 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_windows.h      Wed May 21 15:25:51 2025
@@ -315,4 +315,4 @@ typedef struct _FILE_ALLOCATED_RANGE_BUF
 # endif
 #endif
 
-#endif /* LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED */
+#endif /* !LIBARCHIVE_ARCHIVE_WINDOWS_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c:1.11 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c:1.12
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c:1.11    Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_zip.c Wed May 21 15:25:51 2025
@@ -43,9 +43,24 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #ifdef HAVE_ZLIB_H
 #include <zlib.h>
 #endif
+#ifdef HAVE_LZMA_H
+#include <lzma.h>
+#endif
+#ifdef HAVE_BZLIB_H
+#include <bzlib.h>
+#endif
+#ifdef HAVE_ZSTD_H
+#include <zstd.h>
+#endif
 
 #include "archive.h"
 #include "archive_cryptor_private.h"
@@ -55,6 +70,7 @@
 #include "archive_hmac_private.h"
 #include "archive_private.h"
 #include "archive_random_private.h"
+#include "archive_time_private.h"
 #include "archive_write_private.h"
 #include "archive_write_set_format_private.h"
 
@@ -62,8 +78,12 @@
 #include "archive_crc32.h"
 #endif
 
-#define ZIP_ENTRY_FLAG_ENCRYPTED       (1<<0)
-#define ZIP_ENTRY_FLAG_LENGTH_AT_END   (1<<3)
+#define ZIP_ENTRY_FLAG_ENCRYPTED       (1 << 0)
+#define ZIP_ENTRY_FLAG_LZMA_EOPM       (1 << 1)
+#define ZIP_ENTRY_FLAG_DEFLATE_MAX     (1 << 1) /* i.e. compression levels 8 & 9 */
+#define ZIP_ENTRY_FLAG_DEFLATE_FAST    (1 << 2) /* i.e. compression levels 3 & 4 */
+#define ZIP_ENTRY_FLAG_DEFLATE_SUPER_FAST      (1 << 1) | (1 << 2) /* i.e. compression levels 1 & 2 */
+#define ZIP_ENTRY_FLAG_LENGTH_AT_END   (1 << 3)
 #define ZIP_ENTRY_FLAG_UTF8_NAME       (1 << 11)
 
 #define ZIP_4GB_MAX ARCHIVE_LITERAL_LL(0xffffffff)
@@ -72,7 +92,11 @@
 enum compression {
        COMPRESSION_UNSPECIFIED = -1,
        COMPRESSION_STORE = 0,
-       COMPRESSION_DEFLATE = 8
+       COMPRESSION_DEFLATE = 8,
+       COMPRESSION_BZIP2 = 12,
+       COMPRESSION_LZMA = 14,
+       COMPRESSION_ZSTD = 93,
+       COMPRESSION_XZ = 95
 };
 
 #ifdef HAVE_ZLIB_H
@@ -119,7 +143,6 @@ struct trad_enc_ctx {
 };
 
 struct zip {
-
        int64_t entry_offset;
        int64_t entry_compressed_size;
        int64_t entry_uncompressed_size;
@@ -155,17 +178,45 @@ struct zip {
        struct archive_string_conv *opt_sconv;
        struct archive_string_conv *sconv_default;
        enum compression requested_compression;
-       int deflate_compression_level;
+       short compression_level;
        int init_default_conversion;
-       enum encryption  encryption_type;
+       enum encryption encryption_type;
+       short threads;
 
 #define ZIP_FLAG_AVOID_ZIP64 1
 #define ZIP_FLAG_FORCE_ZIP64 2
 #define ZIP_FLAG_EXPERIMENT_xl 4
        int flags;
-
+#if defined(HAVE_LZMA_H) || defined(HAVE_ZLIB_H) || defined(HAVE_BZLIB_H) || defined(HAVE_ZSTD_H)
+       union {
+#ifdef HAVE_LZMA_H
+               /* ZIP's XZ format (id 95) is easy enough: copy Deflate, mutatis
+                * mutandis the library changes. ZIP's LZMA format (id 14),
+                * however, is rather more involved, starting here: it being a
+                * modified LZMA Alone format requires a bit more
+                * book-keeping. */
+               struct {
+                       char headers_to_write;
+                       lzma_options_lzma options;
+                       lzma_stream context;
+               } lzma;
+#endif
 #ifdef HAVE_ZLIB_H
-       z_stream stream;
+               z_stream deflate;
+#endif
+#ifdef HAVE_BZLIB_H
+               bz_stream bzip2;
+#endif
+#if defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream
+               struct {
+                       /* Libzstd's init function gives a pointer to a memory area
+                        * it manages rather than asking for memory to initialise. */
+                       ZSTD_CStream* context;
+                       ZSTD_inBuffer in;
+                       ZSTD_outBuffer out;
+               } zstd;
+#endif
+       } stream;
 #endif
        size_t len_buf;
        unsigned char *buf;
@@ -184,7 +235,6 @@ static int archive_write_zip_header(stru
              struct archive_entry *);
 static int archive_write_zip_options(struct archive_write *,
              const char *, const char *);
-static unsigned int dos_time(const time_t);
 static size_t path_length(struct archive_entry *);
 static int write_path(struct archive_entry *, struct archive_write *);
 static void copy_path(struct archive_entry *, unsigned char *);
@@ -197,6 +247,44 @@ static int is_traditional_pkware_encrypt
 static int init_winzip_aes_encryption(struct archive_write *);
 static int is_winzip_aes_encryption_supported(int encryption);
 
+#ifdef HAVE_LZMA_H
+/* ZIP's LZMA format requires the use of a alas not exposed in LibLZMA
+ * function to write the ZIP header. Given our internal version never
+ * fails, no need for a non-void return type. */
+static void
+lzma_lzma_props_encode(const lzma_options_lzma* options, uint8_t* out)
+{
+       out[0] = (options->pb * 5 + options->lp) * 9 + options->lc;
+       archive_le32enc(out + 1, options->dict_size);
+}
+#endif
+
+#if defined(HAVE_LZMA_H) && !defined(HAVE_LZMA_STREAM_ENCODER_MT)
+/* Dummy mt declarations, to avoid spaghetti includes below. Defined with
+ * macros being renamed afterwards to shadow liblzma's types in order to
+ * avoid some compiler errors. */
+#define lzma_stream_encoder_mt(str, opt) dummy_mt(str, opt)
+#define lzma_mt dummy_options
+
+typedef struct {
+       void* filters;
+       uint32_t preset;
+       lzma_check check;
+       short threads;
+       char flags;
+       char block_size;
+       char timeout;
+} dummy_options;
+
+static inline lzma_ret
+dummy_mt(lzma_stream* stream, const lzma_mt* options)
+{
+       (void)stream; /* UNUSED */
+       (void)options; /* UNUSED */
+       return LZMA_PROG_ERROR;
+}
+#endif
+
 static unsigned char *
 cd_alloc(struct zip *zip, size_t length)
 {
@@ -274,26 +362,104 @@ archive_write_zip_options(struct archive
                } else if (strcmp(val, "store") == 0) {
                        zip->requested_compression = COMPRESSION_STORE;
                        ret = ARCHIVE_OK;
+               } else if (strcmp(val, "bzip2") == 0) {
+#ifdef HAVE_BZLIB_H
+                       zip->requested_compression = COMPRESSION_BZIP2;
+                       ret = ARCHIVE_OK;
+#else
+                       archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                           "bzip2 compression not supported");
+#endif
+               } else if (strcmp(val, "lzma") == 0) {
+#ifdef HAVE_LZMA_H
+                       zip->requested_compression = COMPRESSION_LZMA;
+                       ret = ARCHIVE_OK;
+#else
+                       archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                           "lzma compression not supported");
+#endif
+               } else if (strcmp(val, "xz") == 0) {
+#ifdef HAVE_LZMA_H
+                       zip->requested_compression = COMPRESSION_XZ;
+                       ret = ARCHIVE_OK;
+#else
+                       archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                           "xz compression not supported");
+#endif
+               } else if (strcmp(val, "zstd") == 0) {
+#if defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream
+                       zip->requested_compression = COMPRESSION_ZSTD;
+                       ret = ARCHIVE_OK;
+#else
+                       archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                           "zstd compression not supported");
+#endif
                }
                return (ret);
        } else if (strcmp(key, "compression-level") == 0) {
-               if (val == NULL || !(val[0] >= '0' && val[0] <= '9') || val[1] != '\0') {
-                       return ARCHIVE_WARN;
+               char *endptr;
+
+               if (val == NULL)
+                       return (ARCHIVE_WARN);
+               errno = 0;
+               zip->compression_level = (short)strtoul(val, &endptr, 10);
+               if (errno != 0 || *endptr != '\0' || zip->compression_level < 0 ||
+                       zip->compression_level > 9) {
+                       zip->compression_level = 6; // set to default
+                       return (ARCHIVE_WARN);
                }
 
-               if (val[0] == '0') {
+               if (zip->compression_level == 0) {
                        zip->requested_compression = COMPRESSION_STORE;
                        return ARCHIVE_OK;
                } else {
+#if defined(HAVE_ZLIB_H) || defined(HAVE_LZMA_H) || defined(HAVE_BZLIB_H) || (defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream)
+                       // Not forcing an already specified compression algorithm
+                       if (zip->requested_compression == COMPRESSION_UNSPECIFIED) {
 #ifdef HAVE_ZLIB_H
-                       zip->requested_compression = COMPRESSION_DEFLATE;
-                       zip->deflate_compression_level = val[0] - '0';
+                               zip->requested_compression = COMPRESSION_DEFLATE;
+#elif defined(HAVE_BZLIB_H)
+                               zip->requested_compression = COMPRESSION_BZIP2;
+#elif defined(HAVE_LZMA_H)
+                               // Arbitrarily choosing LZMA of the two LZMA methods
+                               zip->requested_compression = COMPRESSION_LZMA;
+#else
+                               zip->requested_compression = COMPRESSION_ZSTD;
+#endif
+                       }
                        return ARCHIVE_OK;
 #else
                        archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-                           "deflate compression not supported");
+                           "compression not supported");
+#endif
+               }
+       } else if (strcmp(key, "threads") == 0) {
+               char *endptr;
+
+               if (val == NULL)
+                       return (ARCHIVE_FAILED);
+               errno = 0;
+               zip->threads = (short)strtoul(val, &endptr, 10);
+               if (errno != 0 || *endptr != '\0') {
+                       zip->threads = 1;
+                       archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                           "Illegal value `%s'", val);
+                       return (ARCHIVE_FAILED);
+               }
+               if (zip->threads == 0) {
+#ifdef HAVE_LZMA_STREAM_ENCODER_MT
+                       zip->threads = lzma_cputhreads();
+#elif defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
+                       zip->threads = sysconf(_SC_NPROCESSORS_ONLN);
+#elif !defined(__CYGWIN__) && defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0601
+                       /* Windows 7 and up */
+                       DWORD activeProcs = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
+                       zip->threads = activeProcs <= SHRT_MAX ? (short)activeProcs : SHRT_MAX;
+#else
+                       zip->threads = 1;
 #endif
                }
+               return (ARCHIVE_OK);
        } else if (strcmp(key, "encryption") == 0) {
                if (val == NULL) {
                        zip->encryption_type = ENCRYPTION_NONE;
@@ -305,8 +471,7 @@ archive_write_zip_options(struct archive
                                zip->encryption_type = ENCRYPTION_TRADITIONAL;
                                ret = ARCHIVE_OK;
                        } else {
-                               archive_set_error(&a->archive,
-                                   ARCHIVE_ERRNO_MISC,
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                                    "encryption not supported");
                        }
                } else if (strcmp(val, "aes128") == 0) {
@@ -315,8 +480,7 @@ archive_write_zip_options(struct archive
                                zip->encryption_type = ENCRYPTION_WINZIP_AES128;
                                ret = ARCHIVE_OK;
                        } else {
-                               archive_set_error(&a->archive,
-                                   ARCHIVE_ERRNO_MISC,
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                                    "encryption not supported");
                        }
                } else if (strcmp(val, "aes256") == 0) {
@@ -325,14 +489,12 @@ archive_write_zip_options(struct archive
                                zip->encryption_type = ENCRYPTION_WINZIP_AES256;
                                ret = ARCHIVE_OK;
                        } else {
-                               archive_set_error(&a->archive,
-                                   ARCHIVE_ERRNO_MISC,
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                                    "encryption not supported");
                        }
                } else {
                        archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
-                           "%s: unknown encryption '%s'",
-                           a->format_name, val);
+                           "%s: unknown encryption '%s'", a->format_name, val);
                }
                return (ret);
        } else if (strcmp(key, "experimental") == 0) {
@@ -422,6 +584,118 @@ archive_write_zip_set_compression_deflat
 }
 
 int
+archive_write_zip_set_compression_bzip2(struct archive *_a)
+{
+       struct archive_write *a = (struct archive_write *)_a;
+       int ret = ARCHIVE_FAILED;
+
+       archive_check_magic(_a, ARCHIVE_WRITE_MAGIC,
+               ARCHIVE_STATE_NEW | ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
+               "archive_write_zip_set_compression_bzip2");
+       if (a->archive.archive_format != ARCHIVE_FORMAT_ZIP) {
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+               "Can only use archive_write_zip_set_compression_bzip2"
+               " with zip format");
+               ret = ARCHIVE_FATAL;
+       } else {
+#ifdef HAVE_BZLIB_H
+               struct zip *zip = a->format_data;
+               zip->requested_compression = COMPRESSION_BZIP2;
+               ret = ARCHIVE_OK;
+#else
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                       "bzip2 compression not supported");
+               ret = ARCHIVE_FAILED;
+#endif
+       }
+       return (ret);
+}
+
+int
+archive_write_zip_set_compression_zstd(struct archive *_a)
+{
+       struct archive_write *a = (struct archive_write *)_a;
+       int ret = ARCHIVE_FAILED;
+
+       archive_check_magic(_a, ARCHIVE_WRITE_MAGIC,
+               ARCHIVE_STATE_NEW | ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
+               "archive_write_zip_set_compression_zstd");
+       if (a->archive.archive_format != ARCHIVE_FORMAT_ZIP) {
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+               "Can only use archive_write_zip_set_compression_zstd"
+               " with zip format");
+               ret = ARCHIVE_FATAL;
+       } else {
+#if defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream
+               struct zip *zip = a->format_data;
+               zip->requested_compression = COMPRESSION_ZSTD;
+               ret = ARCHIVE_OK;
+#else
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                       "zstd compression not supported");
+               ret = ARCHIVE_FAILED;
+#endif
+       }
+       return (ret);
+}
+
+int
+archive_write_zip_set_compression_lzma(struct archive *_a)
+{
+       struct archive_write *a = (struct archive_write *)_a;
+       int ret = ARCHIVE_FAILED;
+
+       archive_check_magic(_a, ARCHIVE_WRITE_MAGIC,
+               ARCHIVE_STATE_NEW | ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
+               "archive_write_zip_set_compression_lzma");
+       if (a->archive.archive_format != ARCHIVE_FORMAT_ZIP) {
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+               "Can only use archive_write_zip_set_compression_lzma"
+               " with zip format");
+               ret = ARCHIVE_FATAL;
+       } else {
+#ifdef HAVE_LZMA_H
+               struct zip *zip = a->format_data;
+               zip->requested_compression = COMPRESSION_LZMA;
+               ret = ARCHIVE_OK;
+#else
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                       "lzma compression not supported");
+               ret = ARCHIVE_FAILED;
+#endif
+       }
+       return (ret);
+}
+
+int
+archive_write_zip_set_compression_xz(struct archive *_a)
+{
+       struct archive_write *a = (struct archive_write *)_a;
+       int ret = ARCHIVE_FAILED;
+
+       archive_check_magic(_a, ARCHIVE_WRITE_MAGIC,
+               ARCHIVE_STATE_NEW | ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
+               "archive_write_zip_set_compression_xz");
+       if (a->archive.archive_format != ARCHIVE_FORMAT_ZIP) {
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+               "Can only use archive_write_zip_set_compression_xz"
+               " with zip format");
+               ret = ARCHIVE_FATAL;
+       } else {
+#ifdef HAVE_LZMA_H
+               struct zip *zip = a->format_data;
+               zip->requested_compression = COMPRESSION_XZ;
+               ret = ARCHIVE_OK;
+#else
+               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                       "xz compression not supported");
+               ret = ARCHIVE_FAILED;
+#endif
+       }
+       return (ret);
+}
+
+int
 archive_write_zip_set_compression_store(struct archive *_a)
 {
        struct archive_write *a = (struct archive_write *)_a;
@@ -430,7 +704,7 @@ archive_write_zip_set_compression_store(
 
        archive_check_magic(_a, ARCHIVE_WRITE_MAGIC,
                ARCHIVE_STATE_NEW | ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
-               "archive_write_zip_set_compression_deflate");
+               "archive_write_zip_set_compression_store");
        if (a->archive.archive_format != ARCHIVE_FORMAT_ZIP) {
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
                        "Can only use archive_write_zip_set_compression_store"
@@ -465,9 +739,14 @@ archive_write_set_format_zip(struct arch
 
        /* "Unspecified" lets us choose the appropriate compression. */
        zip->requested_compression = COMPRESSION_UNSPECIFIED;
-#ifdef HAVE_ZLIB_H
-       zip->deflate_compression_level = Z_DEFAULT_COMPRESSION;
-#endif
+       /* Following the 7-zip write support's lead, setting the default
+        * compression level explicitly to 6 no matter what. */
+       zip->compression_level = 6;
+       /* Following the xar write support's lead, the default number of
+        * threads is 1 (i.e. the xz compression, the only one caring about
+        * that, not being multi-threaded even if the multi-threaded encoder
+        * were available) */
+       zip->threads = 1;
        zip->crc32func = real_crc32;
 
        /* A buffer used for both compression and encryption. */
@@ -552,7 +831,6 @@ archive_write_zip_header(struct archive_
        if (type != AE_IFREG)
                archive_entry_set_size(entry, 0);
 
-
        /* Reset information from last entry. */
        zip->entry_offset = zip->written_bytes;
        zip->entry_uncompressed_limit = INT64_MAX;
@@ -589,7 +867,6 @@ archive_write_zip_header(struct archive_
                }
        }
 
-
 #if defined(_WIN32) && !defined(__CYGWIN__)
        /* Make sure the path separators in pathname, hardlink and symlink
         * are all slash '/', not the Windows path separator '\'. */
@@ -685,13 +962,49 @@ archive_write_zip_header(struct archive_
                if (zip->entry_compression == COMPRESSION_UNSPECIFIED) {
                        zip->entry_compression = COMPRESSION_DEFAULT;
                }
-               if (zip->entry_compression == COMPRESSION_STORE) {
+               switch (zip->entry_compression) {
+               case COMPRESSION_STORE:
                        zip->entry_compressed_size = size;
                        zip->entry_uncompressed_size = size;
                        MIN_VERSION_NEEDED(10);
-               } else {
+                       break;
+               case COMPRESSION_ZSTD:
+                       zip->entry_uncompressed_size = size;
+                       MIN_VERSION_NEEDED(63);
+                       break;
+               case COMPRESSION_LZMA:
                        zip->entry_uncompressed_size = size;
+                       zip->entry_flags |= ZIP_ENTRY_FLAG_LZMA_EOPM;
+                       MIN_VERSION_NEEDED(63);
+                       break;
+               case COMPRESSION_XZ:
+                       zip->entry_uncompressed_size = size;
+                       MIN_VERSION_NEEDED(63);
+                       break;
+               case COMPRESSION_BZIP2:
+                       zip->entry_uncompressed_size = size;
+                       MIN_VERSION_NEEDED(46);
+                       break;
+               default: // i.e. deflate compression
+                       zip->entry_uncompressed_size = size;
+                       switch (zip->compression_level) {
+                       case 1:
+                       case 2:
+                               zip->entry_flags |= ZIP_ENTRY_FLAG_DEFLATE_SUPER_FAST;
+                               break;
+                       case 3:
+                       case 4:
+                               zip->entry_flags |= ZIP_ENTRY_FLAG_DEFLATE_FAST;
+                               break;
+                       case 8:
+                       case 9:
+                               zip->entry_flags |= ZIP_ENTRY_FLAG_DEFLATE_MAX;
+                               break;
+                       default:
+                               break;
+                       }
                        MIN_VERSION_NEEDED(20);
+                       break;
                }
 
                if (zip->entry_flags & ZIP_ENTRY_FLAG_ENCRYPTED) {
@@ -741,9 +1054,8 @@ archive_write_zip_header(struct archive_
                /* We don't know the size. Use the default
                 * compression unless specified otherwise.
                 */
-
                zip->entry_compression = zip->requested_compression;
-               if(zip->entry_compression == COMPRESSION_UNSPECIFIED){
+               if (zip->entry_compression == COMPRESSION_UNSPECIFIED) {
                        zip->entry_compression = COMPRESSION_DEFAULT;
                }
 
@@ -751,10 +1063,43 @@ archive_write_zip_header(struct archive_
                if ((zip->flags & ZIP_FLAG_AVOID_ZIP64) == 0) {
                        /* We might use zip64 extensions, so require 4.5 */
                        MIN_VERSION_NEEDED(45);
-               } else if (zip->entry_compression == COMPRESSION_STORE) {
+               }
+               switch (zip->entry_compression) {
+               case COMPRESSION_STORE:
                        MIN_VERSION_NEEDED(10);
-               } else {
+                       break;
+               case COMPRESSION_ZSTD:
+                       MIN_VERSION_NEEDED(63);
+                       break;
+               case COMPRESSION_LZMA:
+                       zip->entry_flags |= ZIP_ENTRY_FLAG_LZMA_EOPM;
+                       MIN_VERSION_NEEDED(63);
+                       break;
+               case COMPRESSION_XZ:
+                       MIN_VERSION_NEEDED(63);
+                       break;
+               case COMPRESSION_BZIP2:
+                       MIN_VERSION_NEEDED(46);
+                       break;
+               default: // i.e. deflate compression
+                       switch (zip->compression_level) {
+                       case 1:
+                       case 2:
+                               zip->entry_flags |= ZIP_ENTRY_FLAG_DEFLATE_SUPER_FAST;
+                               break;
+                       case 3:
+                       case 4:
+                               zip->entry_flags |= ZIP_ENTRY_FLAG_DEFLATE_FAST;
+                               break;
+                       case 8:
+                       case 9:
+                               zip->entry_flags |= ZIP_ENTRY_FLAG_DEFLATE_MAX;
+                               break;
+                       default:
+                               break;
+                       }
                        MIN_VERSION_NEEDED(20);
+                       break;
                }
 
                if (zip->entry_flags & ZIP_ENTRY_FLAG_ENCRYPTED) {
@@ -782,7 +1127,7 @@ archive_write_zip_header(struct archive_
        else
                archive_le16enc(local_header + 8, zip->entry_compression);
        archive_le32enc(local_header + 10,
-               dos_time(archive_entry_mtime(zip->entry)));
+               unix_to_dos(archive_entry_mtime(zip->entry)));
        if ((zip->entry_flags & ZIP_ENTRY_FLAG_LENGTH_AT_END) == 0) {
                archive_le32enc(local_header + 14, zip->entry_crc32);
                archive_le32enc(local_header + 18, (uint32_t)zip->entry_compressed_size);
@@ -813,7 +1158,7 @@ archive_write_zip_header(struct archive_
        else
                archive_le16enc(zip->file_header + 10, zip->entry_compression);
        archive_le32enc(zip->file_header + 12,
-               dos_time(archive_entry_mtime(zip->entry)));
+               unix_to_dos(archive_entry_mtime(zip->entry)));
        archive_le16enc(zip->file_header + 28, (uint16_t)filename_length);
        /* Following Info-Zip, store mode in the "external attributes" field. */
        archive_le32enc(zip->file_header + 38,
@@ -983,21 +1328,147 @@ archive_write_zip_header(struct archive_
                zip->written_bytes += slink_size;
        }
 
+       switch (zip->entry_compression) {
 #ifdef HAVE_ZLIB_H
-       if (zip->entry_compression == COMPRESSION_DEFLATE) {
-               zip->stream.zalloc = Z_NULL;
-               zip->stream.zfree = Z_NULL;
-               zip->stream.opaque = Z_NULL;
-               zip->stream.next_out = zip->buf;
-               zip->stream.avail_out = (uInt)zip->len_buf;
-               if (deflateInit2(&zip->stream, zip->deflate_compression_level,
+       case COMPRESSION_DEFLATE:
+               zip->stream.deflate.zalloc = Z_NULL;
+               zip->stream.deflate.zfree = Z_NULL;
+               zip->stream.deflate.opaque = Z_NULL;
+               zip->stream.deflate.next_out = zip->buf;
+               zip->stream.deflate.avail_out = (uInt)zip->len_buf;
+               if (deflateInit2(&zip->stream.deflate, zip->compression_level,
                    Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY) != Z_OK) {
                        archive_set_error(&a->archive, ENOMEM,
                            "Can't init deflate compressor");
                        return (ARCHIVE_FATAL);
                }
-       }
+               break;
+#endif
+#ifdef HAVE_BZLIB_H
+       case COMPRESSION_BZIP2:
+               memset(&zip->stream.bzip2, 0, sizeof(bz_stream));
+               zip->stream.bzip2.next_out = (char*)zip->buf;
+               zip->stream.bzip2.avail_out = (unsigned int)zip->len_buf;
+               if (BZ2_bzCompressInit(&zip->stream.bzip2, zip->compression_level, 0, 0) != BZ_OK) {
+                       archive_set_error(&a->archive, ENOMEM,
+                           "Can't init bzip2 compressor");
+                       return (ARCHIVE_FATAL);
+               }
+               break;
+#endif
+#if defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream
+       case COMPRESSION_ZSTD:
+               {/* Libzstd, contrary to many compression libraries, doesn't use
+                * zlib's 0 to 9 scale and its negative scale is way bigger than
+                * its positive one. So setting 1 as the lowest allowed compression
+                * level and rescaling to 2 to 9 to libzstd's positive scale. */
+               int zstd_compression_level = zip->compression_level == 1
+                       ? ZSTD_minCLevel() // ZSTD_minCLevel is negative !
+                       : (zip->compression_level - 1) * ZSTD_maxCLevel() / 8;
+               zip->stream.zstd.context = ZSTD_createCStream();
+               size_t zret = ZSTD_initCStream(zip->stream.zstd.context, zstd_compression_level);
+               if (ZSTD_isError(zret)) {
+                       archive_set_error(&a->archive, ENOMEM,
+                           "Can't init zstd compressor");
+                       return (ARCHIVE_FATAL);
+               }
+               /* Asking for the multi-threaded compressor is a no-op in zstd if
+                * it's not supported, so no need to explicitly check for it */
+               ZSTD_CCtx_setParameter(zip->stream.zstd.context, ZSTD_c_nbWorkers, zip->threads);
+               zip->stream.zstd.out.dst = zip->buf;
+               zip->stream.zstd.out.size = zip->len_buf;
+               zip->stream.zstd.out.pos = 0;
+               break;}
+#endif
+#ifdef HAVE_LZMA_H
+       case COMPRESSION_LZMA:
+               {/* Set compression level 9 as the no-holds barred one */
+               uint32_t lzma_compression_level = zip->compression_level == 9
+                       ? LZMA_PRESET_EXTREME | zip->compression_level
+                       : (uint32_t)zip->compression_level;
+               /* Forcibly setting up the encoder to use the LZMA1 variant, as
+                * it is the one LZMA Alone uses. */
+               lzma_filter filters[2] = {
+                       {
+                               .id = LZMA_FILTER_LZMA1,
+                               .options = &zip->stream.lzma.options
+                       },
+                       {
+                               .id = LZMA_VLI_UNKNOWN
+                       }
+               };
+               memset(&zip->stream.lzma.context, 0, sizeof(lzma_stream));
+               lzma_lzma_preset(&zip->stream.lzma.options, lzma_compression_level);
+               zip->stream.lzma.headers_to_write = 1;
+               /* We'll be writing the headers ourselves, so using the raw
+                * encoder */
+               if (lzma_raw_encoder(&zip->stream.lzma.context, filters) != LZMA_OK) {
+                       archive_set_error(&a->archive, ENOMEM,
+                           "Can't init lzma compressor");
+                       return (ARCHIVE_FATAL);
+               }
+               zip->stream.lzma.context.next_out = zip->buf;
+               zip->stream.lzma.context.avail_out = (unsigned int)zip->len_buf;
+               break;}
+       case COMPRESSION_XZ:
+               {/* Set compression level 9 as the no-holds barred one */
+               uint32_t lzma_compression_level = zip->compression_level == 9
+                       ? LZMA_PRESET_EXTREME | zip->compression_level
+                       : (uint32_t)zip->compression_level;
+               lzma_ret retval;
+#ifndef HAVE_LZMA_STREAM_ENCODER_MT
+               /* Force the number of threads to one, and thus to a mono-threaded
+                * encoder in case we don't have the multi-threaded one */
+               zip->threads = 1;
 #endif
+               memset(&zip->stream.lzma.context, 0, sizeof(lzma_stream));
+               /* The XZ check will be arbitrarily set to none: ZIP already has
+                * a CRC-32 check of its own */
+               if (zip->threads == 1) {
+                       /* XZ uses LZMA2. */
+                       lzma_filter filters[2] = {
+                               {
+                                       .id = LZMA_FILTER_LZMA2,
+                                       .options = &zip->stream.lzma.options
+                               },
+                               {
+                                       .id = LZMA_VLI_UNKNOWN
+                               }
+                       };
+                       /* Might as well use the lzma_options we already allocated,
+                        * even if we'll never use it after the initialisation */
+                       lzma_lzma_preset(&zip->stream.lzma.options, lzma_compression_level);
+                       /* 1 thread requested, so non multi-threaded encoder */
+                       retval = lzma_stream_encoder(&zip->stream.lzma.context,
+                               filters, LZMA_CHECK_NONE);
+               }
+               else {
+                       lzma_mt options = {
+                               .flags = 0,
+                               .block_size = 0,
+                               .timeout = 0,
+                               .filters = NULL,
+                               .check = LZMA_CHECK_NONE,
+                               .preset = lzma_compression_level,
+                               .threads = zip->threads
+                       };
+                       /* More than 1 thread requested, so multi-threaded encoder
+                        * which always outputs XZ */
+                       retval = lzma_stream_encoder_mt(&zip->stream.lzma.context,
+                               &options);
+               }
+               if (retval != LZMA_OK) {
+                       archive_set_error(&a->archive, ENOMEM,
+                           "Can't init xz compressor");
+                       return (ARCHIVE_FATAL);
+               }
+               zip->stream.lzma.context.next_out = zip->buf;
+               zip->stream.lzma.context.avail_out = (unsigned int)zip->len_buf;
+               break;}
+#endif
+       default:
+               break;
+       }
 
        return (ret2);
 }
@@ -1082,15 +1553,15 @@ archive_write_zip_data(struct archive_wr
                        zip->entry_compressed_written += s;
                }
                break;
-#if HAVE_ZLIB_H
+#ifdef HAVE_ZLIB_H
        case COMPRESSION_DEFLATE:
-               zip->stream.next_in = (unsigned char*)(uintptr_t)buff;
-               zip->stream.avail_in = (uInt)s;
+               zip->stream.deflate.next_in = (unsigned char*)(uintptr_t)buff;
+               zip->stream.deflate.avail_in = (uInt)s;
                do {
-                       ret = deflate(&zip->stream, Z_NO_FLUSH);
+                       ret = deflate(&zip->stream.deflate, Z_NO_FLUSH);
                        if (ret == Z_STREAM_ERROR)
                                return (ARCHIVE_FATAL);
-                       if (zip->stream.avail_out == 0) {
+                       if (zip->stream.deflate.avail_out == 0) {
                                if (zip->tctx_valid) {
                                        trad_enc_encrypt_update(&zip->tctx,
                                            zip->buf, zip->len_buf,
@@ -1116,13 +1587,223 @@ archive_write_zip_data(struct archive_wr
                                        return (ret);
                                zip->entry_compressed_written += zip->len_buf;
                                zip->written_bytes += zip->len_buf;
-                               zip->stream.next_out = zip->buf;
-                               zip->stream.avail_out = (uInt)zip->len_buf;
+                               zip->stream.deflate.next_out = zip->buf;
+                               zip->stream.deflate.avail_out = (uInt)zip->len_buf;
                        }
-               } while (zip->stream.avail_in != 0);
+               } while (zip->stream.deflate.avail_in != 0);
+               break;
+#endif
+#if defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream
+       case COMPRESSION_ZSTD:
+               zip->stream.zstd.in.src = buff;
+               zip->stream.zstd.in.size = s;
+               zip->stream.zstd.in.pos = 0;
+               do {
+                       size_t zret = ZSTD_compressStream(zip->stream.zstd.context,
+                               &zip->stream.zstd.out, &zip->stream.zstd.in);
+                       if (ZSTD_isError(zret))
+                               return (ARCHIVE_FATAL);
+                       if (zip->stream.zstd.out.pos == zip->stream.zstd.out.size) {
+                               if (zip->tctx_valid) {
+                                       trad_enc_encrypt_update(&zip->tctx,
+                                               zip->buf, zip->len_buf,
+                                               zip->buf, zip->len_buf);
+                               } else if (zip->cctx_valid) {
+                                       size_t outl = zip->len_buf;
+                                       ret = archive_encrypto_aes_ctr_update(
+                                               &zip->cctx,
+                                               zip->buf, zip->len_buf,
+                                               zip->buf, &outl);
+                                       if (ret < 0) {
+                                               archive_set_error(&a->archive,
+                                                       ARCHIVE_ERRNO_MISC,
+                                                       "Failed to encrypt file");
+                                               return (ARCHIVE_FAILED);
+                                       }
+                                       archive_hmac_sha1_update(&zip->hctx,
+                                               zip->buf, zip->len_buf);
+                               }
+                               ret = __archive_write_output(a, zip->buf,
+                                       zip->len_buf);
+                               if (ret != ARCHIVE_OK)
+                                       return (ret);
+                               zip->entry_compressed_written += zip->len_buf;
+                               zip->written_bytes += zip->len_buf;
+                               zip->stream.zstd.out.dst = zip->buf;
+                               zip->stream.zstd.out.size = zip->len_buf;
+                               zip->stream.zstd.out.pos = 0;
+                       }
+               } while (zip->stream.zstd.in.pos != zip->stream.zstd.in.size);
+               break;
+#endif
+#ifdef HAVE_BZLIB_H
+       case COMPRESSION_BZIP2:
+               zip->stream.bzip2.next_in = (char*)(uintptr_t)buff;
+               zip->stream.bzip2.avail_in = (unsigned int)s;
+               do {
+                       ret = BZ2_bzCompress(&zip->stream.bzip2, BZ_RUN);
+                       if (ret != BZ_RUN_OK)
+                               return (ARCHIVE_FATAL);
+                       if (zip->stream.bzip2.avail_out == 0) {
+                               if (zip->tctx_valid) {
+                                       trad_enc_encrypt_update(&zip->tctx,
+                                               zip->buf, zip->len_buf,
+                                               zip->buf, zip->len_buf);
+                               } else if (zip->cctx_valid) {
+                                       size_t outl = zip->len_buf;
+                                       ret = archive_encrypto_aes_ctr_update(
+                                               &zip->cctx,
+                                               zip->buf, zip->len_buf,
+                                               zip->buf, &outl);
+                                       if (ret < 0) {
+                                               archive_set_error(&a->archive,
+                                                       ARCHIVE_ERRNO_MISC,
+                                                       "Failed to encrypt file");
+                                               return (ARCHIVE_FAILED);
+                                       }
+                                       archive_hmac_sha1_update(&zip->hctx,
+                                               zip->buf, zip->len_buf);
+                               }
+                               ret = __archive_write_output(a, zip->buf,
+                                       zip->len_buf);
+                               if (ret != ARCHIVE_OK)
+                                       return (ret);
+                               zip->entry_compressed_written += zip->len_buf;
+                               zip->written_bytes += zip->len_buf;
+                               zip->stream.bzip2.next_out = (char*)zip->buf;
+                               zip->stream.bzip2.avail_out = (unsigned int)zip->len_buf;
+                       }
+               } while (zip->stream.bzip2.avail_in != 0);
+               break;
+#endif
+#ifdef HAVE_LZMA_H
+       case COMPRESSION_LZMA:
+               if (zip->stream.lzma.headers_to_write) {
+                       /* LZMA Alone and ZIP's LZMA format (i.e. id 14) are almost
+                        * the same. Here's an example of a structure of LZMA Alone:
+                        *
+                        * $ cat /bin/ls | lzma | xxd | head -n 1
+                        * 00000000: 5d00 0080 00ff ffff ffff ffff ff00 2814
+                        *
+                        *    5 bytes        8 bytes        n bytes
+                        * <lzma_params><uncompressed_size><data...>
+                        *
+                        * lzma_params is a 5-byte blob that has to be decoded to
+                        * extract parameters of this LZMA stream. The
+                        * uncompressed_size field is an uint64_t value that contains
+                        * information about the size of the uncompressed file, or
+                        * UINT64_MAX if this value is unknown. The <data...> part is
+                        * the actual LZMA-compressed data stream.
+                        *
+                        * Now here's the structure of ZIP's LZMA format:
+                        *
+                        * $ cat stream_inside_zipx | xxd | head -n 1
+                        * 00000000: 0914 0500 5d00 8000 0000 2814 .... ....
+                        *
+                        *  2byte   2byte    5 bytes     n bytes
+                        * <magic1><magic2><lzma_params><data...>
+                        *
+                        * This means that ZIP's LZMA format contains an additional
+                        * magic1 and magic2 headers, the lzma_params field contains
+                        * the same parameter set as in LZMA Alone, and the <data...>
+                        * field is the same as in LZMA Alone as well. However, note
+                        * that ZIP's format is missing the uncompressed_size field.
+                        *
+                        * So we need to write a raw LZMA stream, set up for LZMA1
+                        * (i.e. the algorithm variant LZMA Alone uses), which was
+                        * done above in the initialisation but first we need to
+                        * write ZIP's LZMA header, as if it were Stored data. Then
+                        * we can use the raw stream as if it were any other. magic1
+                        * being version numbers and magic2 being lzma_params's size,
+                        * they get written in without further ado but lzma_params
+                        * requires to use other functions than the usual lzma_stream
+                        * manipulating ones, hence the additional book-keeping
+                        * required alongside the lzma_stream.
+                        */
+                       uint8_t buf[9] = { LZMA_VERSION_MAJOR, LZMA_VERSION_MINOR, 5, 0 };
+                       lzma_lzma_props_encode(&zip->stream.lzma.options, buf + 4);
+                       const size_t sh = 9;
+                       if (zip->tctx_valid || zip->cctx_valid) {
+                               uint8_t* header = buf;
+                               const uint8_t * const rh = header + sh;
+
+                               while (header < rh) {
+                                       size_t l;
+
+                                       if (zip->tctx_valid) {
+                                               l = trad_enc_encrypt_update(&zip->tctx,
+                                                       header, rh - header,
+                                                       zip->buf, zip->len_buf);
+                                       } else {
+                                               l = zip->len_buf;
+                                               ret = archive_encrypto_aes_ctr_update(
+                                                       &zip->cctx,
+                                                       header, rh - header, zip->buf, &l);
+                                               if (ret < 0) {
+                                                       archive_set_error(&a->archive,
+                                                               ARCHIVE_ERRNO_MISC,
+                                                               "Failed to encrypt file");
+                                                       return (ARCHIVE_FAILED);
+                                               }
+                                               archive_hmac_sha1_update(&zip->hctx,
+                                                       zip->buf, l);
+                                       }
+                                       ret = __archive_write_output(a, zip->buf, l);
+                                       if (ret != ARCHIVE_OK)
+                                               return (ret);
+                                       zip->entry_compressed_written += l;
+                                       zip->written_bytes += l;
+                                       header += l;
+                               }
+                       } else {
+                               ret = __archive_write_output(a, buf, sh);
+                               if (ret != ARCHIVE_OK)
+                                       return (ret);
+                               zip->written_bytes += sh;
+                               zip->entry_compressed_written += sh;
+                       }
+                       zip->stream.lzma.headers_to_write = 0;
+               }
+               /* FALLTHROUGH */
+       case COMPRESSION_XZ:
+               zip->stream.lzma.context.next_in = (unsigned char*)(uintptr_t)buff;
+               zip->stream.lzma.context.avail_in = (unsigned int)s;
+               do {
+                       ret = lzma_code(&zip->stream.lzma.context, LZMA_RUN);
+                       if (ret == LZMA_MEM_ERROR)
+                               return (ARCHIVE_FATAL);
+                       if (zip->stream.lzma.context.avail_out == 0) {
+                               if (zip->tctx_valid) {
+                                       trad_enc_encrypt_update(&zip->tctx,
+                                               zip->buf, zip->len_buf,
+                                               zip->buf, zip->len_buf);
+                               } else if (zip->cctx_valid) {
+                                       size_t outl = zip->len_buf;
+                                       ret = archive_encrypto_aes_ctr_update(
+                                               &zip->cctx,
+                                               zip->buf, zip->len_buf,
+                                               zip->buf, &outl);
+                                       if (ret < 0) {
+                                               archive_set_error(&a->archive,
+                                                       ARCHIVE_ERRNO_MISC,
+                                                       "Failed to encrypt file");
+                                               return (ARCHIVE_FAILED);
+                                       }
+                                       archive_hmac_sha1_update(&zip->hctx,
+                                               zip->buf, zip->len_buf);
+                               }
+                               ret = __archive_write_output(a, zip->buf,
+                                       zip->len_buf);
+                               if (ret != ARCHIVE_OK)
+                                       return (ret);
+                               zip->entry_compressed_written += zip->len_buf;
+                               zip->written_bytes += zip->len_buf;
+                               zip->stream.lzma.context.next_out = zip->buf;
+                               zip->stream.lzma.context.avail_out = (unsigned int)zip->len_buf;
+                       }
+               } while (zip->stream.lzma.context.avail_in != 0);
                break;
 #endif
-
        case COMPRESSION_UNSPECIFIED:
        default:
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
@@ -1135,7 +1816,6 @@ archive_write_zip_data(struct archive_wr
                zip->entry_crc32 =
                    zip->crc32func(zip->entry_crc32, buff, (unsigned)s);
        return (s);
-
 }
 
 static int
@@ -1143,16 +1823,20 @@ archive_write_zip_finish_entry(struct ar
 {
        struct zip *zip = a->format_data;
        int ret;
+#if defined(HAVE_BZLIB_H) || (defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream) || HAVE_LZMA_H
+       char finishing;
+#endif
 
-#if HAVE_ZLIB_H
-       if (zip->entry_compression == COMPRESSION_DEFLATE) {
+       switch (zip->entry_compression) {
+#ifdef HAVE_ZLIB_H
+       case COMPRESSION_DEFLATE:
                for (;;) {
                        size_t remainder;
 
-                       ret = deflate(&zip->stream, Z_FINISH);
+                       ret = deflate(&zip->stream.deflate, Z_FINISH);
                        if (ret == Z_STREAM_ERROR)
                                return (ARCHIVE_FATAL);
-                       remainder = zip->len_buf - zip->stream.avail_out;
+                       remainder = zip->len_buf - zip->stream.deflate.avail_out;
                        if (zip->tctx_valid) {
                                trad_enc_encrypt_update(&zip->tctx,
                                    zip->buf, remainder, zip->buf, remainder);
@@ -1175,14 +1859,145 @@ archive_write_zip_finish_entry(struct ar
                                return (ret);
                        zip->entry_compressed_written += remainder;
                        zip->written_bytes += remainder;
-                       zip->stream.next_out = zip->buf;
-                       if (zip->stream.avail_out != 0)
+                       zip->stream.deflate.next_out = zip->buf;
+                       if (zip->stream.deflate.avail_out != 0)
                                break;
-                       zip->stream.avail_out = (uInt)zip->len_buf;
+                       zip->stream.deflate.avail_out = (uInt)zip->len_buf;
                }
-               deflateEnd(&zip->stream);
-       }
+               deflateEnd(&zip->stream.deflate);
+               break;
 #endif
+#ifdef HAVE_BZLIB_H
+       case COMPRESSION_BZIP2:
+               finishing = 1;
+               do {
+                       size_t remainder;
+
+                       ret = BZ2_bzCompress(&zip->stream.bzip2, BZ_FINISH);
+                       if (ret == BZ_STREAM_END)
+                               finishing = 0;
+                       else if (ret != BZ_RUN_OK && ret != BZ_FINISH_OK)
+                               return (ARCHIVE_FATAL);
+                       remainder = zip->len_buf - zip->stream.bzip2.avail_out;
+                       if (zip->tctx_valid) {
+                               trad_enc_encrypt_update(&zip->tctx,
+                                   zip->buf, remainder, zip->buf, remainder);
+                       } else if (zip->cctx_valid) {
+                               size_t outl = remainder;
+                               ret = archive_encrypto_aes_ctr_update(
+                                   &zip->cctx, zip->buf, remainder,
+                                   zip->buf, &outl);
+                               if (ret < 0) {
+                                       archive_set_error(&a->archive,
+                                           ARCHIVE_ERRNO_MISC,
+                                           "Failed to encrypt file");
+                                       return (ARCHIVE_FAILED);
+                               }
+                               archive_hmac_sha1_update(&zip->hctx,
+                                   zip->buf, remainder);
+                       }
+                       ret = __archive_write_output(a, zip->buf, remainder);
+                       if (ret != ARCHIVE_OK)
+                               return (ret);
+                       zip->entry_compressed_written += remainder;
+                       zip->written_bytes += remainder;
+                       zip->stream.bzip2.next_out = (char*)zip->buf;
+                       if (zip->stream.bzip2.avail_out != 0)
+                               finishing = 0;
+                       zip->stream.bzip2.avail_out = (unsigned int)zip->len_buf;
+               } while (finishing);
+               BZ2_bzCompressEnd(&zip->stream.bzip2);
+               break;
+#endif
+#if defined(HAVE_ZSTD_H) && HAVE_ZSTD_compressStream
+       case COMPRESSION_ZSTD:
+               finishing = 1;
+               do {
+                       size_t remainder;
+
+                       size_t zret = ZSTD_endStream(zip->stream.zstd.context, &zip->stream.zstd.out);
+                       if (zret == 0)
+                               finishing = 0;
+                       else if (ZSTD_isError(zret))
+                               return (ARCHIVE_FATAL);
+                       remainder = zip->len_buf - (zip->stream.zstd.out.size - zip->stream.zstd.out.pos);
+                       if (zip->tctx_valid) {
+                               trad_enc_encrypt_update(&zip->tctx,
+                                   zip->buf, remainder, zip->buf, remainder);
+                       } else if (zip->cctx_valid) {
+                               size_t outl = remainder;
+                               ret = archive_encrypto_aes_ctr_update(
+                                   &zip->cctx, zip->buf, remainder,
+                                   zip->buf, &outl);
+                               if (ret < 0) {
+                                       archive_set_error(&a->archive,
+                                           ARCHIVE_ERRNO_MISC,
+                                           "Failed to encrypt file");
+                                       return (ARCHIVE_FAILED);
+                               }
+                               archive_hmac_sha1_update(&zip->hctx,
+                                   zip->buf, remainder);
+                       }
+                       ret = __archive_write_output(a, zip->buf, remainder);
+                       if (ret != ARCHIVE_OK)
+                               return (ret);
+                       zip->entry_compressed_written += remainder;
+                       zip->written_bytes += remainder;
+                       zip->stream.zstd.out.dst = zip->buf;
+                       if (zip->stream.zstd.out.pos != zip->stream.zstd.out.size)
+                               finishing = 0;
+                       zip->stream.zstd.out.size = zip->len_buf;
+               } while (finishing);
+               ZSTD_freeCStream(zip->stream.zstd.context);
+               break;
+#endif
+#ifdef HAVE_LZMA_H
+       /* XZ and LZMA share clean-up code */
+       case COMPRESSION_LZMA:
+       case COMPRESSION_XZ:
+               finishing = 1;
+               do {
+                       size_t remainder;
+
+                       ret = lzma_code(&zip->stream.lzma.context, LZMA_FINISH);
+                       if (ret == LZMA_STREAM_END)
+                               finishing = 0;
+                       else if (ret == LZMA_MEM_ERROR)
+                               return (ARCHIVE_FATAL);
+                       remainder = zip->len_buf - zip->stream.lzma.context.avail_out;
+                       if (zip->tctx_valid) {
+                               trad_enc_encrypt_update(&zip->tctx,
+                                   zip->buf, remainder, zip->buf, remainder);
+                       } else if (zip->cctx_valid) {
+                               size_t outl = remainder;
+                               ret = archive_encrypto_aes_ctr_update(
+                                   &zip->cctx, zip->buf, remainder,
+                                   zip->buf, &outl);
+                               if (ret < 0) {
+                                       archive_set_error(&a->archive,
+                                           ARCHIVE_ERRNO_MISC,
+                                           "Failed to encrypt file");
+                                       return (ARCHIVE_FAILED);
+                               }
+                               archive_hmac_sha1_update(&zip->hctx,
+                                   zip->buf, remainder);
+                       }
+                       ret = __archive_write_output(a, zip->buf, remainder);
+                       if (ret != ARCHIVE_OK)
+                               return (ret);
+                       zip->entry_compressed_written += remainder;
+                       zip->written_bytes += remainder;
+                       zip->stream.lzma.context.next_out = zip->buf;
+                       if (zip->stream.lzma.context.avail_out != 0)
+                               finishing = 0;
+                       zip->stream.lzma.context.avail_out = (unsigned int)zip->len_buf;
+               } while (finishing);
+               lzma_end(&zip->stream.lzma.context);
+               break;
+#endif
+       default:
+               break;
+       }
        if (zip->hctx_valid) {
                uint8_t hmac[20];
                size_t hmac_len = 20;
@@ -1366,7 +2181,6 @@ archive_write_zip_close(struct archive_w
          if (ret != ARCHIVE_OK)
                  return (ARCHIVE_FATAL);
          zip->written_bytes += 20;
-
        }
 
        /* Format and write end of central directory. */
@@ -1413,44 +2227,6 @@ archive_write_zip_free(struct archive_wr
        return (ARCHIVE_OK);
 }
 
-/* Convert into MSDOS-style date/time. */
-static unsigned int
-dos_time(const time_t unix_time)
-{
-       struct tm *t;
-       unsigned int dt;
-#if defined(HAVE_LOCALTIME_R) || defined(HAVE_LOCALTIME_S)
-       struct tm tmbuf;
-#endif
-
-#if defined(HAVE_LOCALTIME_S)
-       t = localtime_s(&tmbuf, &unix_time) ? NULL : &tmbuf;
-#elif defined(HAVE_LOCALTIME_R)
-       t = localtime_r(&unix_time, &tmbuf);
-#else
-       t = localtime(&unix_time);
-#endif
-
-       /* MSDOS-style date/time is only between 1980-01-01 and 2107-12-31 */
-       if (t->tm_year < 1980 - 1900)
-               /* Set minimum date/time '1980-01-01 00:00:00'. */
-               dt = 0x00210000U;
-       else if (t->tm_year > 2107 - 1900)
-               /* Set maximum date/time '2107-12-31 23:59:58'. */
-               dt = 0xff9fbf7dU;
-       else {
-               dt = 0;
-               dt += ((t->tm_year - 80) & 0x7f) << 9;
-               dt += ((t->tm_mon + 1) & 0x0f) << 5;
-               dt += (t->tm_mday & 0x1f);
-               dt <<= 16;
-               dt += (t->tm_hour & 0x1f) << 11;
-               dt += (t->tm_min & 0x3f) << 5;
-               dt += (t->tm_sec & 0x3e) >> 1; /* Only counting every 2 seconds. */
-       }
-       return dt;
-}
-
 static size_t
 path_length(struct archive_entry *entry)
 {
@@ -1518,7 +2294,6 @@ copy_path(struct archive_entry *entry, u
                p[pathlen] = '/';
 }
 
-
 static struct archive_string_conv *
 get_sconv(struct archive_write *a, struct zip *zip)
 {
@@ -1576,7 +2351,6 @@ trad_enc_encrypt_update(struct trad_enc_
 static int
 trad_enc_init(struct trad_enc_ctx *ctx, const char *pw, size_t pw_len)
 {
-
        ctx->keys[0] = 305419896L;
        ctx->keys[1] = 591751049L;
        ctx->keys[2] = 878082192L;

Index: pkgsrc/archivers/libarchive/files/libarchive/archive.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive.h:1.20 pkgsrc/archivers/libarchive/files/libarchive/archive.h:1.21
--- pkgsrc/archivers/libarchive/files/libarchive/archive.h:1.20 Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive.h      Wed May 21 15:25:50 2025
@@ -34,12 +34,15 @@
  * assert that ARCHIVE_VERSION_NUMBER >= 2012108.
  */
 /* Note: Compiler will complain if this does not match archive_entry.h! */
-#define        ARCHIVE_VERSION_NUMBER 3007009
+#define        ARCHIVE_VERSION_NUMBER 3008000
 
 #include <sys/stat.h>
 #include <stddef.h>  /* for wchar_t */
 #include <stdio.h> /* For FILE * */
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* time_t is slated to be removed from public includes in 4.0 */
 #include <time.h> /* For time_t */
+#endif
 
 /*
  * Note: archive.h is for use outside of libarchive; the configuration
@@ -63,12 +66,15 @@
 #define __LA_INT64_T_DEFINED
 # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
 typedef __int64 la_int64_t;
+typedef unsigned __int64 la_uint64_t;
 # else
 # include <unistd.h>  /* ssize_t */
 #  if defined(_SCO_DS) || defined(__osf__)
 typedef long long la_int64_t;
+typedef unsigned long long la_uint64_t;
 #  else
 typedef int64_t la_int64_t;
+typedef uint64_t la_uint64_t;
 #  endif
 # endif
 #endif
@@ -94,6 +100,22 @@ typedef ssize_t la_ssize_t;
 # endif
 #endif
 
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* Use the platform types for time_t */
+#define __LA_TIME_T time_t
+#else
+/* Use 64-bits integer types for time_t */
+#define __LA_TIME_T la_int64_t
+#endif
+
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* Use the platform types for dev_t */
+#define __LA_DEV_T dev_t
+#else
+/* Use 64-bits integer types for dev_t */
+#define __LA_DEV_T la_int64_t
+#endif
+
 /* Large file support for Android */
 #if defined(__LIBARCHIVE_BUILD) && defined(__ANDROID__)
 #include "android_lf.h"
@@ -155,7 +177,7 @@ __LA_DECL int               archive_version_number(vo
 /*
  * Textual name/version of the library, useful for version displays.
  */
-#define        ARCHIVE_VERSION_ONLY_STRING "3.7.9"
+#define        ARCHIVE_VERSION_ONLY_STRING "3.8.0"
 #define        ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
 __LA_DECL const char * archive_version_string(void);
 
@@ -178,6 +200,23 @@ __LA_DECL const char *  archive_liblzma_
 __LA_DECL const char *  archive_bzlib_version(void);
 __LA_DECL const char *  archive_liblz4_version(void);
 __LA_DECL const char *  archive_libzstd_version(void);
+__LA_DECL const char *  archive_liblzo2_version(void);
+__LA_DECL const char *  archive_libexpat_version(void);
+__LA_DECL const char *  archive_libbsdxml_version(void);
+__LA_DECL const char *  archive_libxml2_version(void);
+__LA_DECL const char *  archive_mbedtls_version(void);
+__LA_DECL const char *  archive_nettle_version(void);
+__LA_DECL const char *  archive_openssl_version(void);
+__LA_DECL const char *  archive_libmd_version(void);
+__LA_DECL const char *  archive_commoncrypto_version(void);
+__LA_DECL const char *  archive_cng_version(void);
+__LA_DECL const char *  archive_wincrypt_version(void);
+__LA_DECL const char *  archive_librichacl_version(void);
+__LA_DECL const char *  archive_libacl_version(void);
+__LA_DECL const char *  archive_libattr_version(void);
+__LA_DECL const char *  archive_libiconv_version(void);
+__LA_DECL const char *  archive_libpcre_version(void);
+__LA_DECL const char *  archive_libpcre2_version(void);
 
 /* Declare our basic types. */
 struct archive;
@@ -449,6 +488,8 @@ __LA_DECL int archive_read_support_forma
 __LA_DECL int archive_read_support_format_cab(struct archive *);
 __LA_DECL int archive_read_support_format_cpio(struct archive *);
 __LA_DECL int archive_read_support_format_empty(struct archive *);
+/* archive_read_support_format_gnutar() is an alias for historical reasons
+ * of archive_read_support_format_tar(). */
 __LA_DECL int archive_read_support_format_gnutar(struct archive *);
 __LA_DECL int archive_read_support_format_iso9660(struct archive *);
 __LA_DECL int archive_read_support_format_lha(struct archive *);
@@ -828,6 +869,10 @@ __LA_DECL int archive_write_set_format_f
 __LA_DECL int archive_write_set_format_filter_by_ext_def(struct archive *a, const char *filename, const char * def_ext);
 __LA_DECL int archive_write_zip_set_compression_deflate(struct archive *);
 __LA_DECL int archive_write_zip_set_compression_store(struct archive *);
+__LA_DECL int archive_write_zip_set_compression_lzma(struct archive *);
+__LA_DECL int archive_write_zip_set_compression_xz(struct archive *);
+__LA_DECL int archive_write_zip_set_compression_bzip2(struct archive *);
+__LA_DECL int archive_write_zip_set_compression_zstd(struct archive *);
 /* Deprecated; use archive_write_open2 instead */
 __LA_DECL int archive_write_open(struct archive *, void *,
                     archive_open_callback *, archive_write_callback *,
@@ -1083,6 +1128,10 @@ __LA_DECL int             archive_compression(stru
                                __LA_DEPRECATED;
 #endif
 
+/* Parses a date string relative to the current time.
+ * NOTE: This is not intended for general date parsing, and the resulting timestamp should only be used for libarchive. */
+__LA_DECL time_t       archive_parse_date(time_t now, const char *datestr);
+
 __LA_DECL int           archive_errno(struct archive *);
 __LA_DECL const char   *archive_error_string(struct archive *);
 __LA_DECL const char   *archive_format_name(struct archive *);

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_acl.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_acl.c:1.8 pkgsrc/archivers/libarchive/files/libarchive/archive_acl.c:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/archive_acl.c:1.8      Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_acl.c  Wed May 21 15:25:50 2025
@@ -1185,8 +1185,13 @@ archive_acl_from_text_w(struct archive_a
                /* Set remaining fields to blank. */
                for (n = fields; n < numfields; ++n)
                        field[n].start = field[n].end = NULL;
+               
+               if (field[0].start == NULL || field[0].end == NULL) {
+                       /* This should never happen */
+                       return (ARCHIVE_FATAL);
+               }
 
-               if (field[0].start != NULL && *(field[0].start) == L'#') {
+               if (*(field[0].start) == L'#') {
                        /* Comment, skip entry */
                        continue;
                }
@@ -1676,7 +1681,12 @@ archive_acl_from_text_nl(struct archive_
                for (n = fields; n < numfields; ++n)
                        field[n].start = field[n].end = NULL;
 
-               if (field[0].start != NULL && *(field[0].start) == '#') {
+               if (field[0].start == NULL || field[0].end == NULL) {
+                       /* This should never happen */
+                       return (ARCHIVE_FATAL);
+               }
+
+               if (*(field[0].start) == '#') {
                        /* Comment, skip entry */
                        continue;
                }
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_match.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_match.c:1.8 pkgsrc/archivers/libarchive/files/libarchive/archive_match.c:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/archive_match.c:1.8    Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_match.c        Wed May 21 15:25:51 2025
@@ -39,10 +39,10 @@
 #include "archive.h"
 #include "archive_private.h"
 #include "archive_entry.h"
-#include "archive_getdate.h"
 #include "archive_pathmatch.h"
 #include "archive_rb.h"
 #include "archive_string.h"
+#include "archive_time_private.h"
 
 struct match {
        struct match            *next;
@@ -187,7 +187,7 @@ static int  time_excluded(struct archive_
                    struct archive_entry *);
 static int     validate_time_flag(struct archive *, int, const char *);
 
-#define get_date __archive_get_date
+#define get_date archive_parse_date
 
 static const struct archive_rb_tree_ops rb_ops_mbs = {
        cmp_node_mbs, cmp_key_mbs
@@ -1145,36 +1145,15 @@ set_timefilter_date_w(struct archive_mat
 }
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
 static int
 set_timefilter_find_data(struct archive_match *a, int timetype,
-    DWORD ftLastWriteTime_dwHighDateTime, DWORD ftLastWriteTime_dwLowDateTime,
-    DWORD ftCreationTime_dwHighDateTime, DWORD ftCreationTime_dwLowDateTime)
+    const FILETIME* ftLastWriteTime, const FILETIME* ftCreationTime)
 {
-       ULARGE_INTEGER utc;
        time_t ctime_sec, mtime_sec;
-       long ctime_ns, mtime_ns;
+       uint32_t ctime_ns, mtime_ns;
 
-       utc.HighPart = ftCreationTime_dwHighDateTime;
-       utc.LowPart = ftCreationTime_dwLowDateTime;
-       if (utc.QuadPart >= EPOC_TIME) {
-               utc.QuadPart -= EPOC_TIME;
-               ctime_sec = (time_t)(utc.QuadPart / 10000000);
-               ctime_ns = (long)(utc.QuadPart % 10000000) * 100;
-       } else {
-               ctime_sec = 0;
-               ctime_ns = 0;
-       }
-       utc.HighPart = ftLastWriteTime_dwHighDateTime;
-       utc.LowPart = ftLastWriteTime_dwLowDateTime;
-       if (utc.QuadPart >= EPOC_TIME) {
-               utc.QuadPart -= EPOC_TIME;
-               mtime_sec = (time_t)(utc.QuadPart / 10000000);
-               mtime_ns = (long)(utc.QuadPart % 10000000) * 100;
-       } else {
-               mtime_sec = 0;
-               mtime_ns = 0;
-       }
+       ntfs_to_unix(FILETIME_to_ntfs(ftLastWriteTime), &mtime_sec, &mtime_ns);
+       ntfs_to_unix(FILETIME_to_ntfs(ftCreationTime), &ctime_sec, &ctime_ns);
        return set_timefilter(a, timetype,
                        mtime_sec, mtime_ns, ctime_sec, ctime_ns);
 }
@@ -1199,9 +1178,7 @@ set_timefilter_pathname_mbs(struct archi
                return (ARCHIVE_FAILED);
        }
        FindClose(h);
-       return set_timefilter_find_data(a, timetype,
-           d.ftLastWriteTime.dwHighDateTime, d.ftLastWriteTime.dwLowDateTime,
-           d.ftCreationTime.dwHighDateTime, d.ftCreationTime.dwLowDateTime);
+       return set_timefilter_find_data(a, timetype, &d.ftLastWriteTime, &d.ftCreationTime);
 }
 
 static int
@@ -1223,9 +1200,7 @@ set_timefilter_pathname_wcs(struct archi
                return (ARCHIVE_FAILED);
        }
        FindClose(h);
-       return set_timefilter_find_data(a, timetype,
-           d.ftLastWriteTime.dwHighDateTime, d.ftLastWriteTime.dwLowDateTime,
-           d.ftCreationTime.dwHighDateTime, d.ftCreationTime.dwLowDateTime);
+       return set_timefilter_find_data(a, timetype, &d.ftLastWriteTime, &d.ftCreationTime);
 }
 
 #else /* _WIN32 && !__CYGWIN__ */
@@ -1871,4 +1846,3 @@ owner_excluded(struct archive_match *a, 
        }
        return (0);
 }
-
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_pack_dev.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_pack_dev.h:1.8 pkgsrc/archivers/libarchive/files/libarchive/archive_pack_dev.h:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/archive_pack_dev.h:1.8 Thu Jan 18 18:00:17 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_pack_dev.h     Wed May 21 15:25:51 2025
@@ -1,4 +1,4 @@
-/*     $NetBSD: archive_pack_dev.h,v 1.8 2024/01/18 18:00:17 adam Exp $        */
+/*     $NetBSD: archive_pack_dev.h,v 1.9 2025/05/21 15:25:51 adam Exp $        */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -46,4 +46,4 @@ pack_t         pack_native;
                                         (((y) << 12) & 0xfff00000) | \
                                         (((y) <<  0) & 0x000000ff)))
 
-#endif /* ARCHIVE_PACK_DEV_H */
+#endif /* !ARCHIVE_PACK_DEV_H */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c:1.8 pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c:1.8     Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_fd.c Wed May 21 15:25:51 2025
@@ -52,6 +52,7 @@
 struct read_fd_data {
        int      fd;
        size_t   block_size;
+       int64_t  size;
        char     use_lseek;
        void    *buffer;
 };
@@ -95,6 +96,7 @@ archive_read_open_fd(struct archive *a, 
        if (S_ISREG(st.st_mode)) {
                archive_read_extract_set_skip_file(a, st.st_dev, st.st_ino);
                mine->use_lseek = 1;
+               mine->size = st.st_size;
        }
 #if defined(__CYGWIN__) || defined(_WIN32)
        setmode(mine->fd, O_BINARY);
@@ -131,7 +133,7 @@ static int64_t
 file_skip(struct archive *a, void *client_data, int64_t request)
 {
        struct read_fd_data *mine = (struct read_fd_data *)client_data;
-       int64_t skip = request;
+       off_t skip = (off_t)request;
        int64_t old_offset, new_offset;
        int skip_bits = sizeof(skip) * 8 - 1;  /* off_t is a signed type. */
 
@@ -140,20 +142,25 @@ file_skip(struct archive *a, void *clien
 
        /* Reduce a request that would overflow the 'skip' variable. */
        if (sizeof(request) > sizeof(skip)) {
-               int64_t max_skip =
+               const int64_t max_skip =
                    (((int64_t)1 << (skip_bits - 1)) - 1) * 2 + 1;
                if (request > max_skip)
-                       skip = max_skip;
+                       skip = (off_t)max_skip;
        }
 
-       /* Reduce request to the next smallest multiple of block_size */
-       request = (request / mine->block_size) * mine->block_size;
-       if (request == 0)
+       /* Reduce 'skip' to the next smallest multiple of block_size */
+       skip = (off_t)(((int64_t)skip / mine->block_size) * mine->block_size);
+       if (skip == 0)
                return (0);
 
-       if (((old_offset = lseek(mine->fd, 0, SEEK_CUR)) >= 0) &&
-           ((new_offset = lseek(mine->fd, skip, SEEK_CUR)) >= 0))
-               return (new_offset - old_offset);
+       if ((old_offset = lseek(mine->fd, 0, SEEK_CUR)) >= 0) {
+               if (old_offset >= mine->size ||
+                   skip > mine->size - old_offset) {
+                       /* Do not seek past end of file. */
+                       errno = ESPIPE;
+               } else if ((new_offset = lseek(mine->fd, skip, SEEK_CUR)) >= 0)
+                       return (new_offset - old_offset);
+       }
 
        /* If seek failed once, it will probably fail again. */
        mine->use_lseek = 0;
@@ -178,11 +185,24 @@ static int64_t
 file_seek(struct archive *a, void *client_data, int64_t request, int whence)
 {
        struct read_fd_data *mine = (struct read_fd_data *)client_data;
+       off_t seek = (off_t)request;
        int64_t r;
+       int seek_bits = sizeof(seek) * 8 - 1;  /* off_t is a signed type. */
 
        /* We use off_t here because lseek() is declared that way. */
-       /* See above for notes about when off_t is less than 64 bits. */
-       r = lseek(mine->fd, request, whence);
+
+       /* Reduce a request that would overflow the 'seek' variable. */
+       if (sizeof(request) > sizeof(seek)) {
+               const int64_t max_seek =
+                   (((int64_t)1 << (seek_bits - 1)) - 1) * 2 + 1;
+               const int64_t min_seek = ~max_seek;
+               if (request > max_seek)
+                       seek = (off_t)max_seek;
+               else if (request < min_seek)
+                       seek = (off_t)min_seek;
+       }
+
+       r = lseek(mine->fd, seek, whence);
        if (r >= 0)
                return r;
 
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c:1.8 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c:1.8     Sun Sep 15 07:02:21 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_xar.c Wed May 21 15:25:51 2025
@@ -34,6 +34,14 @@
 #include <stdlib.h>
 #if HAVE_LIBXML_XMLWRITER_H
 #include <libxml/xmlwriter.h>
+#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 20703
+#define XAR_WRITER_HAS_XML
+#endif /* LIBXML_VERSION */
+#elif HAVE_XMLLITE_H
+#include <objidl.h>
+#include <initguid.h>
+#include <xmllite.h>
+#define XAR_WRITER_HAS_XML
 #endif
 #ifdef HAVE_BZLIB_H
 #include <bzlib.h>
@@ -70,13 +78,12 @@
  *
  */
 
-#if !(defined(HAVE_LIBXML_XMLWRITER_H) && defined(LIBXML_VERSION) &&\
-       LIBXML_VERSION >= 20703) ||\
+#if !defined(XAR_WRITER_HAS_XML) ||\
        !defined(HAVE_ZLIB_H) || \
        !defined(ARCHIVE_HAS_MD5) || !defined(ARCHIVE_HAS_SHA1)
 /*
  * xar needs several external libraries.
- *   o libxml2
+ *   o libxml2 or xmllite (on Windows)
  *   o openssl or MD5/SHA1 hash function
  *   o zlib
  *   o bzlib2 (option)
@@ -94,9 +101,26 @@ archive_write_set_format_xar(struct arch
 
 #else  /* Support xar format */
 
-/*#define DEBUG_PRINT_TOC              1 */
+struct xml_writer;
+static int xml_writer_create(struct xml_writer **pctx);
+static int xml_writer_start_document(struct xml_writer *ctx);
+static int xml_writer_end_document(struct xml_writer *ctx);
+static int xml_writer_set_indent(struct xml_writer *ctx, unsigned int indent);
+static int xml_writer_start_element(struct xml_writer *ctx,
+    const char *localName);
+static int xml_writer_write_attribute(struct xml_writer *ctx, const char *key,
+    const char *value);
+static int xml_writer_write_attributef(struct xml_writer *ctx, const char *key,
+    const char *format, ...);
+static int xml_writer_write_string(struct xml_writer *ctx, const char *string);
+static int xml_writer_write_base64(struct xml_writer* ctx,
+    const char *data, size_t start, size_t len);
+static int xml_writer_end_element(struct xml_writer *ctx);
+static int xml_writer_get_final_content_and_length(struct xml_writer *ctx,
+    const char **out, size_t *size);
+static int xml_writer_destroy(struct xml_writer *ctx);
 
-#define BAD_CAST_CONST (const xmlChar *)
+/*#define DEBUG_PRINT_TOC              1 */
 
 #define HEADER_MAGIC   0x78617221
 #define HEADER_SIZE    28
@@ -807,50 +831,49 @@ xar_finish_entry(struct archive_write *a
 }
 
 static int
-xmlwrite_string_attr(struct archive_write *a, xmlTextWriterPtr writer,
+xmlwrite_string_attr(struct archive_write *a, struct xml_writer *writer,
        const char *key, const char *value,
        const char *attrkey, const char *attrvalue)
 {
        int r;
 
-       r = xmlTextWriterStartElement(writer, BAD_CAST_CONST(key));
+       r = xml_writer_start_element(writer, key);
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterStartElement() failed: %d", r);
+                   "xml_writer_start_element() failed: %d", r);
                return (ARCHIVE_FATAL);
        }
        if (attrkey != NULL && attrvalue != NULL) {
-               r = xmlTextWriterWriteAttribute(writer,
-                   BAD_CAST_CONST(attrkey), BAD_CAST_CONST(attrvalue));
+               r = xml_writer_write_attribute(writer, attrkey, attrvalue);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterWriteAttribute() failed: %d", r);
+                           "xml_writer_write_attribute() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        }
        if (value != NULL) {
-               r = xmlTextWriterWriteString(writer, BAD_CAST_CONST(value));
+               r = xml_writer_write_string(writer, value);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterWriteString() failed: %d", r);
+                           "xml_writer_write_string() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        }
-       r = xmlTextWriterEndElement(writer);
+       r = xml_writer_end_element(writer);
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterEndElement() failed: %d", r);
+                   "xml_writer_end_element() failed: %d", r);
                return (ARCHIVE_FATAL);
        }
        return (ARCHIVE_OK);
 }
 
 static int
-xmlwrite_string(struct archive_write *a, xmlTextWriterPtr writer,
+xmlwrite_string(struct archive_write *a, struct xml_writer *writer,
        const char *key, const char *value)
 {
        int r;
@@ -858,34 +881,34 @@ xmlwrite_string(struct archive_write *a,
        if (value == NULL)
                return (ARCHIVE_OK);
 
-       r = xmlTextWriterStartElement(writer, BAD_CAST_CONST(key));
+       r = xml_writer_start_element(writer, key);
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterStartElement() failed: %d", r);
+                   "xml_writer_start_element() failed: %d", r);
                return (ARCHIVE_FATAL);
        }
        if (value != NULL) {
-               r = xmlTextWriterWriteString(writer, BAD_CAST_CONST(value));
+               r = xml_writer_write_string(writer, value);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterWriteString() failed: %d", r);
+                           "xml_writer_write_string() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        }
-       r = xmlTextWriterEndElement(writer);
+       r = xml_writer_end_element(writer);
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterEndElement() failed: %d", r);
+                   "xml_writer_end_element() failed: %d", r);
                return (ARCHIVE_FATAL);
        }
        return (ARCHIVE_OK);
 }
 
 static int
-xmlwrite_fstring(struct archive_write *a, xmlTextWriterPtr writer,
+xmlwrite_fstring(struct archive_write *a, struct xml_writer *writer,
        const char *key, const char *fmt, ...)
 {
        struct xar *xar;
@@ -900,7 +923,7 @@ xmlwrite_fstring(struct archive_write *a
 }
 
 static int
-xmlwrite_time(struct archive_write *a, xmlTextWriterPtr writer,
+xmlwrite_time(struct archive_write *a, struct xml_writer *writer,
        const char *key, time_t t, int z)
 {
        char timestr[100];
@@ -922,7 +945,7 @@ xmlwrite_time(struct archive_write *a, x
 }
 
 static int
-xmlwrite_mode(struct archive_write *a, xmlTextWriterPtr writer,
+xmlwrite_mode(struct archive_write *a, struct xml_writer *writer,
        const char *key, mode_t mode)
 {
        char ms[5];
@@ -937,7 +960,7 @@ xmlwrite_mode(struct archive_write *a, x
 }
 
 static int
-xmlwrite_sum(struct archive_write *a, xmlTextWriterPtr writer,
+xmlwrite_sum(struct archive_write *a, struct xml_writer *writer,
        const char *key, struct chksumval *sum)
 {
        const char *algname;
@@ -971,7 +994,7 @@ xmlwrite_sum(struct archive_write *a, xm
 }
 
 static int
-xmlwrite_heap(struct archive_write *a, xmlTextWriterPtr writer,
+xmlwrite_heap(struct archive_write *a, struct xml_writer *writer,
        struct heap_data *heap)
 {
        const char *encname;
@@ -1029,7 +1052,7 @@ xmlwrite_heap(struct archive_write *a, x
  * Our implements records both <flags> and <ext2> if it's necessary.
  */
 static int
-make_fflags_entry(struct archive_write *a, xmlTextWriterPtr writer,
+make_fflags_entry(struct archive_write *a, struct xml_writer *writer,
     const char *element, const char *fflags_text)
 {
        static const struct flagentry {
@@ -1119,11 +1142,11 @@ make_fflags_entry(struct archive_write *
        } while (p != NULL);
 
        if (n > 0) {
-               r = xmlTextWriterStartElement(writer, BAD_CAST_CONST(element));
+               r = xml_writer_start_element(writer, element);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterStartElement() failed: %d", r);
+                           "xml_writer_start_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
                for (i = 0; i < n; i++) {
@@ -1133,29 +1156,59 @@ make_fflags_entry(struct archive_write *
                                return (r);
                }
 
-               r = xmlTextWriterEndElement(writer);
+               r = xml_writer_end_element(writer);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterEndElement() failed: %d", r);
+                           "xml_writer_end_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        }
        return (ARCHIVE_OK);
 }
 
+/*
+ * This function determines whether a UTF-8 string contains
+ * only codepoints that are convertible to Latin-1. Strings
+ * beyond Latin-1 are stored base64-encoded in the XAR TOC.
+ */
+static int
+is_u8_zstring_latin1(const char *in)
+{
+       unsigned int c;
+       while (*in) {
+               c = *in++;
+               if (c < 0x80) continue;
+               /*
+                * Filter out non-continuation, any continuation of 2-3
+                * bytes, and any continuation of 1 byte whose high 3 bits
+                * are non-zero. Recall, 1-byte continuations can store 11
+                * bits whereas Latin-1 codepoints are only 8 bits wide.
+                */
+               if ((c & 0xFC) != 0xC0)
+                       return (0);
+               c = *in++;
+               /*
+                * If we get any non-continuation byte (including 0x00!),
+                * the string is not valid UTF-8.
+                */
+               if ((c & 0xC0) != 0x80)
+                       return (0); /* invalid unicode */
+       }
+       return (1);
+}
+
 static int
-make_file_entry(struct archive_write *a, xmlTextWriterPtr writer,
+make_file_entry(struct archive_write *a, struct xml_writer *writer,
     struct file *file)
 {
        struct xar *xar;
        const char *filetype, *filelink, *fflags;
        struct archive_string linkto;
        struct heap_data *heap;
-       unsigned char *tmp;
        const char *p;
        size_t len;
-       int r, r2, l, ll;
+       int r, r2;
 
        xar = (struct xar *)a->format_data;
        r2 = ARCHIVE_OK;
@@ -1163,44 +1216,35 @@ make_file_entry(struct archive_write *a,
        /*
         * Make a file name entry, "<name>".
         */
-       l = ll = (int)archive_strlen(&(file->basename));
-       tmp = malloc(l);
-       if (tmp == NULL) {
-               archive_set_error(&a->archive, ENOMEM,
-                   "Can't allocate memory");
-               return (ARCHIVE_FATAL);
-       }
-       r = UTF8Toisolat1(tmp, &l, BAD_CAST(file->basename.s), &ll);
-       free(tmp);
-       if (r < 0) {
-               r = xmlTextWriterStartElement(writer, BAD_CAST("name"));
+       if (!is_u8_zstring_latin1(file->basename.s)) {
+               r = xml_writer_start_element(writer, "name");
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterStartElement() failed: %d", r);
+                           "xml_writer_start_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
-               r = xmlTextWriterWriteAttribute(writer,
-                   BAD_CAST("enctype"), BAD_CAST("base64"));
+               r = xml_writer_write_attribute(writer,
+                   "enctype", "base64");
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterWriteAttribute() failed: %d", r);
+                           "xml_writer_write_attribute() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
-               r = xmlTextWriterWriteBase64(writer, file->basename.s,
+               r = xml_writer_write_base64(writer, file->basename.s,
                    0, (int)archive_strlen(&(file->basename)));
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterWriteBase64() failed: %d", r);
+                           "xml_writer_write_base64() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
-               r = xmlTextWriterEndElement(writer);
+               r = xml_writer_end_element(writer);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterEndElement() failed: %d", r);
+                           "xml_writer_end_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        } else {
@@ -1281,11 +1325,11 @@ make_file_entry(struct archive_write *a,
                break;
        case AE_IFCHR:
        case AE_IFBLK:
-               r = xmlTextWriterStartElement(writer, BAD_CAST("device"));
+               r = xml_writer_start_element(writer, "device");
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterStartElement() failed: %d", r);
+                           "xml_writer_start_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
                r = xmlwrite_fstring(a, writer, "major",
@@ -1296,11 +1340,11 @@ make_file_entry(struct archive_write *a,
                    "%d", archive_entry_rdevminor(file->entry));
                if (r < 0)
                        return (ARCHIVE_FATAL);
-               r = xmlTextWriterEndElement(writer);
+               r = xml_writer_end_element(writer);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterEndElement() failed: %d", r);
+                           "xml_writer_end_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
                break;
@@ -1436,19 +1480,19 @@ make_file_entry(struct archive_write *a,
 
                archive_entry_xattr_next(file->entry,
                    &name, &value, &size);
-               r = xmlTextWriterStartElement(writer, BAD_CAST("ea"));
+               r = xml_writer_start_element(writer, "ea");
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterStartElement() failed: %d", r);
+                           "xml_writer_start_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
-               r = xmlTextWriterWriteFormatAttribute(writer,
-                   BAD_CAST("id"), "%d", heap->id);
+               r = xml_writer_write_attributef(writer,
+                   "id", "%d", heap->id);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterWriteAttribute() failed: %d", r);
+                           "xml_writer_write_attributef() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
                r = xmlwrite_heap(a, writer, heap);
@@ -1458,11 +1502,11 @@ make_file_entry(struct archive_write *a,
                if (r < 0)
                        return (ARCHIVE_FATAL);
 
-               r = xmlTextWriterEndElement(writer);
+               r = xml_writer_end_element(writer);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterEndElement() failed: %d", r);
+                           "xml_writer_end_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        }
@@ -1471,11 +1515,11 @@ make_file_entry(struct archive_write *a,
         * Make a file data entry, "<data>".
         */
        if (file->data.length > 0) {
-               r = xmlTextWriterStartElement(writer, BAD_CAST("data"));
+               r = xml_writer_start_element(writer, "data");
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterStartElement() failed: %d", r);
+                           "xml_writer_start_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
 
@@ -1483,21 +1527,21 @@ make_file_entry(struct archive_write *a,
                if (r < 0)
                        return (ARCHIVE_FATAL);
 
-               r = xmlTextWriterEndElement(writer);
+               r = xml_writer_end_element(writer);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterEndElement() failed: %d", r);
+                           "xml_writer_end_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        }
 
        if (archive_strlen(&file->script) > 0) {
-               r = xmlTextWriterStartElement(writer, BAD_CAST("content"));
+               r = xml_writer_start_element(writer, "content");
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterStartElement() failed: %d", r);
+                           "xml_writer_start_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
 
@@ -1510,11 +1554,11 @@ make_file_entry(struct archive_write *a,
                if (r < 0)
                        return (ARCHIVE_FATAL);
 
-               r = xmlTextWriterEndElement(writer);
+               r = xml_writer_end_element(writer);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterEndElement() failed: %d", r);
+                           "xml_writer_end_element() failed: %d", r);
                        return (ARCHIVE_FATAL);
                }
        }
@@ -1530,8 +1574,9 @@ make_toc(struct archive_write *a)
 {
        struct xar *xar;
        struct file *np;
-       xmlBufferPtr bp;
-       xmlTextWriterPtr writer;
+       struct xml_writer *writer;
+       const char* content;
+       size_t use;
        int algsize;
        int r, ret;
 
@@ -1543,51 +1588,43 @@ make_toc(struct archive_write *a)
         * Initialize xml writer.
         */
        writer = NULL;
-       bp = xmlBufferCreate();
-       if (bp == NULL) {
-               archive_set_error(&a->archive, ENOMEM,
-                   "xmlBufferCreate() "
-                   "couldn't create xml buffer");
-               goto exit_toc;
-       }
-       writer = xmlNewTextWriterMemory(bp, 0);
-       if (writer == NULL) {
+       r = xml_writer_create(&writer);
+       if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlNewTextWriterMemory() "
-                   "couldn't create xml writer");
+                   "xml_writer_create() failed: %d", r);
                goto exit_toc;
        }
-       r = xmlTextWriterStartDocument(writer, "1.0", "UTF-8", NULL);
+       r = xml_writer_set_indent(writer, 4);
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterStartDocument() failed: %d", r);
+                   "xml_writer_set_indent() failed: %d", r);
                goto exit_toc;
        }
-       r = xmlTextWriterSetIndent(writer, 4);
+       r = xml_writer_start_document(writer);
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterSetIndent() failed: %d", r);
+                   "xml_writer_start_document() failed: %d", r);
                goto exit_toc;
        }
 
        /*
         * Start recording TOC
         */
-       r = xmlTextWriterStartElement(writer, BAD_CAST("xar"));
+       r = xml_writer_start_element(writer, "xar");
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterStartElement() failed: %d", r);
+                   "xml_writer_start_element() failed: %d", r);
                goto exit_toc;
        }
-       r = xmlTextWriterStartElement(writer, BAD_CAST("toc"));
+       r = xml_writer_start_element(writer, "toc");
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterStartDocument() failed: %d", r);
+                   "xml_writer_start_element() failed: %d", r);
                goto exit_toc;
        }
 
@@ -1606,19 +1643,19 @@ make_toc(struct archive_write *a)
                /*
                 * Record TOC checksum
                 */
-               r = xmlTextWriterStartElement(writer, BAD_CAST("checksum"));
+               r = xml_writer_start_element(writer, "checksum");
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterStartElement() failed: %d", r);
+                           "xml_writer_start_element() failed: %d", r);
                        goto exit_toc;
                }
-               r = xmlTextWriterWriteAttribute(writer, BAD_CAST("style"),
-                   BAD_CAST_CONST(getalgname(xar->opt_toc_sumalg)));
+               r = xml_writer_write_attribute(writer, "style",
+                   getalgname(xar->opt_toc_sumalg));
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterWriteAttribute() failed: %d", r);
+                           "xml_writer_write_attribute() failed: %d", r);
                        goto exit_toc;
                }
 
@@ -1636,11 +1673,11 @@ make_toc(struct archive_write *a)
                if (r < 0)
                        goto exit_toc;
 
-               r = xmlTextWriterEndElement(writer);
+               r = xml_writer_end_element(writer);
                if (r < 0) {
                        archive_set_error(&a->archive,
                            ARCHIVE_ERRNO_MISC,
-                           "xmlTextWriterEndElement() failed: %d", r);
+                           "xml_writer_end_element() failed: %d", r);
                        goto exit_toc;
                }
        }
@@ -1656,32 +1693,32 @@ make_toc(struct archive_write *a)
                if (np->dir && np->children.first != NULL) {
                        /* Enter to sub directories. */
                        np = np->children.first;
-                       r = xmlTextWriterStartElement(writer,
-                           BAD_CAST("file"));
+                       r = xml_writer_start_element(writer,
+                           "file");
                        if (r < 0) {
                                archive_set_error(&a->archive,
                                    ARCHIVE_ERRNO_MISC,
-                                   "xmlTextWriterStartElement() "
+                                   "xml_writer_start_element() "
                                    "failed: %d", r);
                                goto exit_toc;
                        }
-                       r = xmlTextWriterWriteFormatAttribute(
-                           writer, BAD_CAST("id"), "%d", np->id);
+                       r = xml_writer_write_attributef(
+                           writer, "id", "%d", np->id);
                        if (r < 0) {
                                archive_set_error(&a->archive,
                                    ARCHIVE_ERRNO_MISC,
-                                   "xmlTextWriterWriteAttribute() "
+                                   "xml_writer_write_attributef() "
                                    "failed: %d", r);
                                goto exit_toc;
                        }
                        continue;
                }
                while (np != np->parent) {
-                       r = xmlTextWriterEndElement(writer);
+                       r = xml_writer_end_element(writer);
                        if (r < 0) {
                                archive_set_error(&a->archive,
                                    ARCHIVE_ERRNO_MISC,
-                                   "xmlTextWriterEndElement() "
+                                   "xml_writer_end_element() "
                                    "failed: %d", r);
                                goto exit_toc;
                        }
@@ -1690,21 +1727,21 @@ make_toc(struct archive_write *a)
                                np = np->parent;
                        } else {
                                np = np->chnext;
-                               r = xmlTextWriterStartElement(writer,
-                                   BAD_CAST("file"));
+                               r = xml_writer_start_element(writer,
+                                   "file");
                                if (r < 0) {
                                        archive_set_error(&a->archive,
                                            ARCHIVE_ERRNO_MISC,
-                                           "xmlTextWriterStartElement() "
+                                           "xml_writer_start_element() "
                                            "failed: %d", r);
                                        goto exit_toc;
                                }
-                               r = xmlTextWriterWriteFormatAttribute(
-                                   writer, BAD_CAST("id"), "%d", np->id);
+                               r = xml_writer_write_attributef(
+                                   writer, "id", "%d", np->id);
                                if (r < 0) {
                                        archive_set_error(&a->archive,
                                            ARCHIVE_ERRNO_MISC,
-                                           "xmlTextWriterWriteAttribute() "
+                                           "xml_writer_write_attributef() "
                                            "failed: %d", r);
                                        goto exit_toc;
                                }
@@ -1713,31 +1750,40 @@ make_toc(struct archive_write *a)
                }
        } while (np != np->parent);
 
-       r = xmlTextWriterEndDocument(writer);
+       r = xml_writer_end_document(writer);
+       if (r < 0) {
+               archive_set_error(&a->archive,
+                   ARCHIVE_ERRNO_MISC,
+                   "xml_writer_end_document() failed: %d", r);
+               goto exit_toc;
+       }
+
+       r = xml_writer_get_final_content_and_length(writer, &content, &use);
        if (r < 0) {
                archive_set_error(&a->archive,
                    ARCHIVE_ERRNO_MISC,
-                   "xmlTextWriterEndDocument() failed: %d", r);
+                   "xml_writer_get_final_content_and_length() failed: %d", r);
                goto exit_toc;
        }
+
 #if DEBUG_PRINT_TOC
        fprintf(stderr, "\n---TOC-- %d bytes --\n%s\n",
-           strlen((const char *)bp->content), bp->content);
+           (int)strlen(content), content);
 #endif
 
        /*
         * Compress the TOC and calculate the sum of the TOC.
         */
        xar->toc.temp_offset = xar->temp_offset;
-       xar->toc.size = bp->use;
+       xar->toc.size = (uint64_t)use;
        checksum_init(&(xar->a_sumwrk), xar->opt_toc_sumalg);
 
        r = compression_init_encoder_gzip(&(a->archive),
            &(xar->stream), 6, 1);
        if (r != ARCHIVE_OK)
                goto exit_toc;
-       xar->stream.next_in = bp->content;
-       xar->stream.avail_in = bp->use;
+       xar->stream.next_in = (const unsigned char *)content;
+       xar->stream.avail_in = use;
        xar->stream.total_in = 0;
        xar->stream.next_out = xar->wbuff;
        xar->stream.avail_out = sizeof(xar->wbuff);
@@ -1768,9 +1814,7 @@ make_toc(struct archive_write *a)
        ret = ARCHIVE_OK;
 exit_toc:
        if (writer)
-               xmlFreeTextWriter(writer);
-       if (bp)
-               xmlBufferFree(bp);
+               xml_writer_destroy(writer);
 
        return (ret);
 }
@@ -3251,4 +3295,404 @@ getalgname(enum sumalg sumalg)
        }
 }
 
+#if HAVE_LIBXML_XMLWRITER_H
+
+#define BAD_CAST_CONST (const xmlChar *)
+
+struct xml_writer {
+       xmlTextWriterPtr writer;
+       xmlBufferPtr bp;
+       unsigned int indent;
+};
+
+static int
+xml_writer_create(struct xml_writer **pctx)
+{
+       struct xml_writer *ctx = calloc(1, sizeof(struct xml_writer));
+       if (ctx == NULL) {
+               return (-1);
+       }
+
+       ctx->bp = xmlBufferCreate();
+       if (ctx->bp == NULL) {
+               free(ctx);
+               return (-1);
+       }
+
+       ctx->writer = xmlNewTextWriterMemory(ctx->bp, 0);
+       if (ctx->writer == NULL) {
+               xmlBufferFree(ctx->bp);
+               free(ctx);
+               return (-1);
+       }
+
+       *pctx = ctx;
+       return (0);
+}
+
+static int
+xml_writer_destroy(struct xml_writer *ctx)
+{
+       xmlFreeTextWriter(ctx->writer);
+       xmlBufferFree(ctx->bp);
+       free(ctx);
+       return (0);
+}
+
+static int
+xml_writer_start_document(struct xml_writer *ctx)
+{
+       int r;
+       r = xmlTextWriterStartDocument(ctx->writer, "1.0", "UTF-8", NULL);
+       if (r < 0) {
+               return (r);
+       }
+
+       r = xmlTextWriterSetIndent(ctx->writer, (int)ctx->indent);
+       return (r);
+}
+
+static int
+xml_writer_end_document(struct xml_writer *ctx)
+{
+       return (xmlTextWriterEndDocument(ctx->writer));
+}
+
+static int
+xml_writer_set_indent(struct xml_writer *ctx, unsigned int indent)
+{
+       /* libxml2 only lets you set the indent after starting the document */
+       ctx->indent = indent;
+       return (0);
+}
+
+static int
+xml_writer_start_element(struct xml_writer *ctx, const char *localName)
+{
+       return (xmlTextWriterStartElement(ctx->writer,
+           BAD_CAST_CONST(localName)));
+}
+
+static int
+xml_writer_write_attribute(struct xml_writer *ctx,
+    const char *key, const char *value)
+{
+       return (xmlTextWriterWriteAttribute(ctx->writer,
+           BAD_CAST_CONST(key), BAD_CAST_CONST(value)));
+}
+
+static int
+xml_writer_write_attributef(struct xml_writer *ctx,
+    const char *key, const char *format, ...)
+{
+       va_list ap;
+       int ret;
+       va_start(ap, format);
+       ret = xmlTextWriterWriteVFormatAttribute(ctx->writer,
+           BAD_CAST_CONST(key), format, ap);
+       va_end(ap);
+       return (ret);
+}
+
+static int
+xml_writer_write_string(struct xml_writer *ctx, const char *string)
+{
+       return (xmlTextWriterWriteString(ctx->writer, BAD_CAST_CONST(string)));
+}
+
+static int
+xml_writer_write_base64(struct xml_writer* ctx,
+    const char *data, size_t start, size_t len)
+{
+       return (xmlTextWriterWriteBase64(ctx->writer, data,
+           (int)start, (int)len));
+}
+
+static int
+xml_writer_end_element(struct xml_writer *ctx)
+{
+       return (xmlTextWriterEndElement(ctx->writer));
+}
+
+static int
+xml_writer_get_final_content_and_length(struct xml_writer *ctx,
+    const char **out, size_t *size)
+{
+       *out = (const char*)ctx->bp->content;
+       *size = (size_t)ctx->bp->use;
+       return (0);
+}
+
+#elif HAVE_XMLLITE_H
+
+struct xml_writer {
+       IXmlWriter *writer;
+       IStream *stream;
+       HGLOBAL global;
+};
+
+static int
+xml_writer_create(struct xml_writer **pctx)
+{
+       struct xml_writer *ctx;
+       HRESULT hr;
+
+       ctx = calloc(1, sizeof(struct xml_writer));
+       if (ctx == NULL) {
+               return (E_OUTOFMEMORY);
+       }
+
+       hr = CreateStreamOnHGlobal(NULL, TRUE, &ctx->stream);
+       if (FAILED(hr)) {
+               free(ctx);
+               return (hr);
+       }
+
+       hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&ctx->writer, NULL);
+       if (FAILED(hr)) {
+               ctx->stream->lpVtbl->Release(ctx->stream);
+               free(ctx);
+               return (hr);
+       }
+
+       hr = ctx->writer->lpVtbl->SetOutput(ctx->writer,
+           (IUnknown *)ctx->stream);
+       if (FAILED(hr)) {
+               ctx->writer->lpVtbl->Release(ctx->writer);
+               ctx->stream->lpVtbl->Release(ctx->stream);
+               free(ctx);
+               return (hr);
+       }
+
+       *pctx = ctx;
+       return (S_OK);
+}
+
+static int
+xml_writer_destroy(struct xml_writer *ctx)
+{
+       if (ctx->global)
+               GlobalUnlock(ctx->global);
+       ctx->writer->lpVtbl->Release(ctx->writer); /* Destroys only writer */
+       ctx->stream->lpVtbl->Release(ctx->stream); /* Destroys stream, global */
+       free(ctx);
+       return (S_OK);
+}
+
+static int
+xml_writer_start_document(struct xml_writer *ctx)
+{
+       return ctx->writer->lpVtbl->WriteStartDocument(ctx->writer,
+           XmlStandalone_Omit);
+}
+
+static int
+xml_writer_end_document(struct xml_writer *ctx)
+{
+       return ctx->writer->lpVtbl->WriteEndDocument(ctx->writer);
+}
+
+static int
+xml_writer_set_indent(struct xml_writer *ctx, unsigned int indent)
+{
+       /* Windows' xmllite does not support indent sizes; will always be 2 */
+       (void)indent;
+       return ctx->writer->lpVtbl->SetProperty(ctx->writer,
+           XmlWriterProperty_Indent, (LONG_PTR)TRUE);
+}
+
+static int
+xml_writer_start_element(struct xml_writer *ctx, const char *localName)
+{
+       struct archive_wstring as;
+       HRESULT hr;
+       archive_string_init(&as);
+       if (archive_wstring_append_from_mbs(&as, localName,
+           strlen(localName))) {
+               hr = E_OUTOFMEMORY;
+               goto exit_hr;
+       }
+       hr = ctx->writer->lpVtbl->WriteStartElement(ctx->writer, NULL,
+           as.s, NULL);
+
+exit_hr:
+       archive_wstring_free(&as);
+       return hr;
+}
+
+static int
+xml_writer_write_attribute(struct xml_writer *ctx,
+    const char *key, const char *value)
+{
+       struct archive_wstring ask, asv;
+       HRESULT hr;
+       archive_string_init(&ask);
+       archive_string_init(&asv);
+       if (archive_wstring_append_from_mbs(&ask, key, strlen(key))) {
+               hr = E_OUTOFMEMORY;
+               goto exit_hr;
+       }
+       if (archive_wstring_append_from_mbs(&asv, value, strlen(value))) {
+               hr = E_OUTOFMEMORY;
+               goto exit_hr;
+       }
+       hr = ctx->writer->lpVtbl->WriteAttributeString(ctx->writer, NULL,
+           ask.s, NULL, asv.s);
+
+exit_hr:
+       archive_wstring_free(&asv);
+       archive_wstring_free(&ask);
+       return hr;
+}
+
+static int
+xml_writer_write_attributef(struct xml_writer *ctx,
+    const char *key, const char *format, ...)
+{
+       struct archive_wstring ask, asv;
+       struct archive_string asf;
+       HRESULT hr;
+       va_list ap;
+
+       va_start(ap, format);
+       archive_string_init(&ask);
+       archive_string_init(&asv);
+       archive_string_init(&asf);
+
+       if (archive_wstring_append_from_mbs(&ask, key, strlen(key))) {
+               hr = E_OUTOFMEMORY;
+               goto exit_hr;
+       }
+
+       archive_string_vsprintf(&asf, format, ap);
+       if (archive_wstring_append_from_mbs(&asv, asf.s, asf.length)) {
+               hr = E_OUTOFMEMORY;
+               goto exit_hr;
+       }
+
+       hr = ctx->writer->lpVtbl->WriteAttributeString(ctx->writer, NULL,
+           ask.s, NULL, asv.s);
+
+exit_hr:
+       archive_string_free(&asf);
+       archive_wstring_free(&asv);
+       archive_wstring_free(&ask);
+       va_end(ap);
+
+       return hr;
+}
+
+static int
+xml_writer_write_string(struct xml_writer *ctx, const char *string)
+{
+       struct archive_wstring as;
+       HRESULT hr;
+       archive_string_init(&as);
+       if (archive_wstring_append_from_mbs(&as, string, strlen(string))) {
+               hr = E_OUTOFMEMORY;
+               goto exit_hr;
+       }
+       hr = ctx->writer->lpVtbl->WriteString(ctx->writer, as.s);
+
+exit_hr:
+       archive_wstring_free(&as);
+       return hr;
+}
+
+static const wchar_t base64[] = {
+       L'A', L'B', L'C', L'D', L'E', L'F', L'G', L'H',
+       L'I', L'J', L'K', L'L', L'M', L'N', L'O', L'P',
+       L'Q', L'R', L'S', L'T', L'U', L'V', L'W', L'X',
+       L'Y', L'Z', L'a', L'b', L'c', L'd', L'e', L'f',
+       L'g', L'h', L'i', L'j', L'k', L'l', L'm', L'n',
+       L'o', L'p', L'q', L'r', L's', L't', L'u', L'v',
+       L'w', L'x', L'y', L'z', L'0', L'1', L'2', L'3',
+       L'4', L'5', L'6', L'7', L'8', L'9', L'+', L'/'
+};
+
+static void
+la_b64_wencode(struct archive_wstring *as, const unsigned char *p, size_t len)
+{
+       int c;
+
+       for (; len >= 3; p += 3, len -= 3) {
+               c = p[0] >> 2;
+               archive_wstrappend_wchar(as, base64[c]);
+               c = ((p[0] & 0x03) << 4) | ((p[1] & 0xf0) >> 4);
+               archive_wstrappend_wchar(as, base64[c]);
+               c = ((p[1] & 0x0f) << 2) | ((p[2] & 0xc0) >> 6);
+               archive_wstrappend_wchar(as, base64[c]);
+               c = p[2] & 0x3f;
+               archive_wstrappend_wchar(as, base64[c]);
+       }
+       if (len > 0) {
+               c = p[0] >> 2;
+               archive_wstrappend_wchar(as, base64[c]);
+               c = (p[0] & 0x03) << 4;
+               if (len == 1) {
+                       archive_wstrappend_wchar(as, base64[c]);
+                       archive_wstrappend_wchar(as, '=');
+                       archive_wstrappend_wchar(as, '=');
+               } else {
+                       c |= (p[1] & 0xf0) >> 4;
+                       archive_wstrappend_wchar(as, base64[c]);
+                       c = (p[1] & 0x0f) << 2;
+                       archive_wstrappend_wchar(as, base64[c]);
+                       archive_wstrappend_wchar(as, '=');
+               }
+       }
+}
+
+static int
+xml_writer_write_base64(struct xml_writer* ctx,
+    const char *data, size_t start, size_t len)
+{
+       struct archive_wstring as;
+       HRESULT hr;
+       archive_string_init(&as);
+       la_b64_wencode(&as, (const unsigned char *)data + start, len - start);
+       hr = ctx->writer->lpVtbl->WriteString(ctx->writer, as.s);
+       archive_wstring_free(&as);
+       return hr;
+}
+
+static int
+xml_writer_end_element(struct xml_writer *ctx)
+{
+       return ctx->writer->lpVtbl->WriteEndElement(ctx->writer);
+}
+
+static int
+xml_writer_get_final_content_and_length(struct xml_writer *ctx,
+    const char **out, size_t *size)
+{
+       HGLOBAL gbl;
+       HRESULT hr;
+
+       hr = ctx->writer->lpVtbl->Flush(ctx->writer);
+       if (FAILED(hr)) {
+               return (hr);
+       }
+
+       hr = GetHGlobalFromStream(ctx->stream, &gbl);
+       if (FAILED(hr)) {
+               return (hr);
+       }
+
+       *out = (const char *)GlobalLock(gbl);
+       if (*out == NULL) {
+               hr = HRESULT_FROM_WIN32(GetLastError());
+               return (hr);
+       }
+
+       /* GlobalUnlock is called in
+        * xml_writer_destroy.
+        */
+       *size = (size_t)GlobalSize(gbl);
+       ctx->global = gbl;
+       return (hr);
+}
+
+#endif /* HAVE_LIBXML_XMLWRITER_H */
+
 #endif /* Support xar format */
Index: pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5
diff -u pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5:1.8 pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5:1.8       Fri Apr 12 15:39:52 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/libarchive-formats.5   Wed May 21 15:25:51 2025
@@ -327,10 +327,26 @@ by the usual environment variables.
 Libarchive can read and write zip format archives that have
 uncompressed entries and entries compressed with the
 .Dq deflate
+,
+.Dq LZMA
+,
+.Dq XZ
+,
+.Dq BZIP2
+and
+.Dq ZSTD
+algorithms.
+Libarchive can also read, but not write, zip format archives that
+have entries compressed with the
+.Dq PPMd
 algorithm.
 Other zip compression algorithms are not supported.
-It can extract jar archives, archives that use Zip64 extensions and
-self-extracting zip archives.
+The extensions supported by libarchive are Zip64, Libarchive's
+extensions to better support streaming, PKZIP's traditional
+ZIP encryption, Info-ZIP's Unix extra fields, extra time, and
+Unicode path, as well as WinZIP's AES encryption.
+It can extract jar archives, __MACOSX resource forks extension
+for OS X, 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

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_acl_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_acl_private.h:1.5 pkgsrc/archivers/libarchive/files/libarchive/archive_acl_private.h:1.6
--- pkgsrc/archivers/libarchive/files/libarchive/archive_acl_private.h:1.5      Sun Sep 15 07:02:20 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_acl_private.h  Wed May 21 15:25:50 2025
@@ -80,4 +80,4 @@ int archive_acl_from_text_l(struct archi
 int archive_acl_from_text_nl(struct archive_acl *, const char * /* text */,
     size_t /* size of text */, int /* type */, struct archive_string_conv *);
 
-#endif /* ARCHIVE_ENTRY_PRIVATE_H_INCLUDED */
+#endif /* !ARCHIVE_ACL_PRIVATE_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_cryptor_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_cryptor_private.h:1.5 pkgsrc/archivers/libarchive/files/libarchive/archive_cryptor_private.h:1.6
--- pkgsrc/archivers/libarchive/files/libarchive/archive_cryptor_private.h:1.5  Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_cryptor_private.h      Wed May 21 15:25:50 2025
@@ -64,6 +64,7 @@ typedef struct {
 
 #elif defined(_WIN32) && !defined(__CYGWIN__) && defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
 #include <bcrypt.h>
+#define        ARCHIVE_CRYPTOR_USE_CNG 1
 
 /* Common in other bcrypt implementations, but missing from VS2008. */
 #ifndef BCRYPT_SUCCESS
@@ -86,6 +87,7 @@ typedef struct {
 #include <mbedtls/aes.h>
 #include <mbedtls/md.h>
 #include <mbedtls/pkcs5.h>
+#define        ARCHIVE_CRYPTOR_USE_MBED 1
 
 #define AES_MAX_KEY_SIZE 32
 #define AES_BLOCK_SIZE 16
@@ -105,6 +107,7 @@ typedef struct {
 #endif
 #include <nettle/aes.h>
 #include <nettle/version.h>
+#define        ARCHIVE_CRYPTOR_USE_NETTLE 1
 
 typedef struct {
 #if NETTLE_VERSION_MAJOR < 3
@@ -125,6 +128,7 @@ typedef struct {
 
 #elif defined(HAVE_LIBCRYPTO)
 #include "archive_openssl_evp_private.h"
+#define        ARCHIVE_CRYPTOR_USE_OPENSSL 1
 #define AES_BLOCK_SIZE 16
 #define AES_MAX_KEY_SIZE 32
 
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_options.3
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_options.3:1.5 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_options.3:1.6
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_options.3:1.5        Fri Apr 12 15:39:52 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_options.3    Wed May 21 15:25:51 2025
@@ -263,7 +263,7 @@ decimal integer specifying log2 window s
 The value is interpreted as a decimal integer specifying the
 number of threads for multi-threaded zstd compression.
 If set to 0, zstd will attempt to detect and use the number
-of physical CPU cores.
+of active physical CPU cores.
 .El
 .It Format 7zip
 .Bl -tag -compact -width indent
@@ -274,9 +274,10 @@ The value is one of
 .Dq deflate ,
 .Dq bzip2 ,
 .Dq lzma1 ,
-.Dq lzma2
+.Dq lzma2 ,
+.Dq ppmd ,
 or
-.Dq ppmd
+.Dq zstd
 to indicate how the following entries should be compressed.
 The values
 .Dq store
@@ -289,9 +290,16 @@ and other special entries.
 The value is interpreted as a decimal integer specifying the
 compression level.
 Values between 0 and 9 are supported, with the exception of bzip2
-which only supports values between 1 and 9.
+which only supports values between 1 and 9, and zstd which may
+support negative values depending on the library version and
+commonly used values 1 through 22.
 The interpretation of the compression level depends on the chosen
 compression method.
+.It Cm threads
+The value is interpreted as a decimal integer specifying the
+number of threads for multi-threaded compression (for compressors
+like zstd that support it). If set to 0, an attempt will be made
+to discover the number of CPU cores.
 .El
 .It Format bin
 .Bl -tag -compact -width indent
@@ -632,9 +640,13 @@ and
 .Bl -tag -compact -width indent
 .It Cm compression
 The value is either
-.Dq store
+.Dq store ,
+.Dq deflate ,
+.Dq bzip2 ,
+.Dq lzma ,
+.Dq xz ,
 or
-.Dq deflate
+.Dq zstd
 to indicate how the following entries should be compressed.
 Note that this setting is ignored for directories, symbolic links,
 and other special entries.
@@ -645,8 +657,23 @@ Values between 0 and 9 are supported.
 A compression level of 0 switches the compression method to
 .Dq store ,
 other values will enable
-.Dq deflate
-compression with the given level.
+.Dq deflate ,
+.Dq bzip2 ,
+.Dq lzma ,
+or
+.Dq zstd
+compression (in order of priority, depending on what libraries 
+are linked) with the given level.
+.It Cm threads
+The value is interpreted as a decimal integer specifying the
+number of threads to use for compression.
+It is supported only for
+.Dq xz
+or
+.Dq zstd
+compression and ignored for any other.
+A threads value of 0 is a special one requesting to detect and use as
+many threads as the number of active physical CPU cores.
 .It Cm encryption
 Enable encryption using traditional zip encryption.
 .It Cm encryption Ns = Ns Ar type

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_cmdline.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_cmdline.c:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_cmdline.c:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_cmdline.c:1.3  Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_cmdline.c      Wed May 21 15:25:50 2025
@@ -71,7 +71,7 @@ get_argument(struct archive_string *as, 
        archive_string_empty(as);
 
        /* Skip beginning space characters. */
-       while (*s != '\0' && *s == ' ')
+       while (*s == ' ')
                s++;
        /* Copy non-space characters. */
        while (*s != '\0' && *s != ' ') {
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_digest_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_digest_private.h:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_digest_private.h:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_digest_private.h:1.3   Thu Jan 18 18:00:17 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_digest_private.h       Wed May 21 15:25:50 2025
@@ -113,6 +113,7 @@
   defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM) ||\
   defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM)
 #include <CommonCrypto/CommonDigest.h>
+#define        ARCHIVE_CRYPTO_CommonCrypto 1
 #endif
 
 /* mbed TLS crypto headers */
@@ -167,6 +168,7 @@
 #if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
 /* don't use bcrypt when XP needs to be supported */
 #include <bcrypt.h>
+#define        ARCHIVE_CRYPTO_CNG 1
 typedef struct {
   int   valid;
   BCRYPT_ALG_HANDLE  hAlg;
@@ -175,6 +177,7 @@ typedef struct {
 #else
 #include <windows.h>
 #include <wincrypt.h>
+#define        ARCHIVE_CRYPTO_WINCRYPT 1
 typedef struct {
   int   valid;
   HCRYPTPROV  cryptProv;
@@ -190,14 +193,16 @@ typedef MD5_CTX archive_md5_ctx;
 typedef MD5_CTX archive_md5_ctx;
 #elif defined(ARCHIVE_CRYPTO_MD5_LIBSYSTEM)
 typedef CC_MD5_CTX archive_md5_ctx;
+#elif defined(ARCHIVE_CRYPTO_MD5_WIN)
+typedef Digest_CTX archive_md5_ctx;
 #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS)
+#define        ARCHIVE_CRYPTO_MBED 1
 typedef mbedtls_md5_context archive_md5_ctx;
 #elif defined(ARCHIVE_CRYPTO_MD5_NETTLE)
+#define        ARCHIVE_CRYPTO_NETTLE 1
 typedef struct md5_ctx archive_md5_ctx;
 #elif defined(ARCHIVE_CRYPTO_MD5_OPENSSL)
 typedef EVP_MD_CTX *archive_md5_ctx;
-#elif defined(ARCHIVE_CRYPTO_MD5_WIN)
-typedef Digest_CTX archive_md5_ctx;
 #else
 typedef unsigned char archive_md5_ctx;
 #endif
@@ -207,8 +212,10 @@ typedef RMD160_CTX archive_rmd160_ctx;
 #elif defined(ARCHIVE_CRYPTO_RMD160_LIBMD)
 typedef RIPEMD160_CTX archive_rmd160_ctx;
 #elif defined(ARCHIVE_CRYPTO_RMD160_MBEDTLS)
+#define        ARCHIVE_CRYPTO_MBED 1
 typedef mbedtls_ripemd160_context archive_rmd160_ctx;
 #elif defined(ARCHIVE_CRYPTO_RMD160_NETTLE)
+#define        ARCHIVE_CRYPTO_NETTLE 1
 typedef struct ripemd160_ctx archive_rmd160_ctx;
 #elif defined(ARCHIVE_CRYPTO_RMD160_OPENSSL)
 typedef EVP_MD_CTX *archive_rmd160_ctx;
@@ -222,14 +229,16 @@ typedef SHA1_CTX archive_sha1_ctx;
 typedef SHA1_CTX archive_sha1_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA1_LIBSYSTEM)
 typedef CC_SHA1_CTX archive_sha1_ctx;
+#elif defined(ARCHIVE_CRYPTO_SHA1_WIN)
+typedef Digest_CTX archive_sha1_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS)
+#define        ARCHIVE_CRYPTO_MBED 1
 typedef mbedtls_sha1_context archive_sha1_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA1_NETTLE)
+#define        ARCHIVE_CRYPTO_NETTLE 1
 typedef struct sha1_ctx archive_sha1_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA1_OPENSSL)
 typedef EVP_MD_CTX *archive_sha1_ctx;
-#elif defined(ARCHIVE_CRYPTO_SHA1_WIN)
-typedef Digest_CTX archive_sha1_ctx;
 #else
 typedef unsigned char archive_sha1_ctx;
 #endif
@@ -244,14 +253,16 @@ typedef SHA2_CTX archive_sha256_ctx;
 typedef SHA256_CTX archive_sha256_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA256_LIBSYSTEM)
 typedef CC_SHA256_CTX archive_sha256_ctx;
+#elif defined(ARCHIVE_CRYPTO_SHA256_WIN)
+typedef Digest_CTX archive_sha256_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS)
+#define        ARCHIVE_CRYPTO_MBED 1
 typedef mbedtls_sha256_context archive_sha256_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA256_NETTLE)
+#define        ARCHIVE_CRYPTO_NETTLE 1
 typedef struct sha256_ctx archive_sha256_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA256_OPENSSL)
 typedef EVP_MD_CTX *archive_sha256_ctx;
-#elif defined(ARCHIVE_CRYPTO_SHA256_WIN)
-typedef Digest_CTX archive_sha256_ctx;
 #else
 typedef unsigned char archive_sha256_ctx;
 #endif
@@ -264,14 +275,16 @@ typedef SHA384_CTX archive_sha384_ctx;
 typedef SHA2_CTX archive_sha384_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA384_LIBSYSTEM)
 typedef CC_SHA512_CTX archive_sha384_ctx;
+#elif defined(ARCHIVE_CRYPTO_SHA384_WIN)
+typedef Digest_CTX archive_sha384_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS)
+#define        ARCHIVE_CRYPTO_MBED 1
 typedef mbedtls_sha512_context archive_sha384_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA384_NETTLE)
+#define        ARCHIVE_CRYPTO_NETTLE 1
 typedef struct sha384_ctx archive_sha384_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA384_OPENSSL)
 typedef EVP_MD_CTX *archive_sha384_ctx;
-#elif defined(ARCHIVE_CRYPTO_SHA384_WIN)
-typedef Digest_CTX archive_sha384_ctx;
 #else
 typedef unsigned char archive_sha384_ctx;
 #endif
@@ -286,14 +299,16 @@ typedef SHA2_CTX archive_sha512_ctx;
 typedef SHA512_CTX archive_sha512_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA512_LIBSYSTEM)
 typedef CC_SHA512_CTX archive_sha512_ctx;
+#elif defined(ARCHIVE_CRYPTO_SHA512_WIN)
+typedef Digest_CTX archive_sha512_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS)
+#define        ARCHIVE_CRYPTO_MBED 1
 typedef mbedtls_sha512_context archive_sha512_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA512_NETTLE)
+#define        ARCHIVE_CRYPTO_NETTLE 1
 typedef struct sha512_ctx archive_sha512_ctx;
 #elif defined(ARCHIVE_CRYPTO_SHA512_OPENSSL)
 typedef EVP_MD_CTX *archive_sha512_ctx;
-#elif defined(ARCHIVE_CRYPTO_SHA512_WIN)
-typedef Digest_CTX archive_sha512_ctx;
 #else
 typedef unsigned char archive_sha512_ctx;
 #endif
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c:1.3 Thu Jan 18 18:00:17 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_disk_acl_freebsd.c     Wed May 21 15:25:50 2025
@@ -262,7 +262,7 @@ translate_acl(struct archive_read_disk *
                        }
                        for (i = 0; i < acl_nfs4_flag_map_size; ++i) {
                                r = acl_get_flag_np(acl_flagset,
-                                   acl_nfs4_flag_map[i].p_perm);
+                                   (acl_flag_t)acl_nfs4_flag_map[i].p_perm);
                                if (r == -1) {
                                        archive_set_error(&a->archive, errno,
                                            "Failed to check flag in a NFSv4 "
@@ -517,7 +517,7 @@ set_acl(struct archive *a, int fd, const
                        for (i = 0; i < acl_nfs4_flag_map_size; ++i) {
                                if (ae_permset & acl_nfs4_flag_map[i].a_perm) {
                                        if (acl_add_flag_np(acl_flagset,
-                                           acl_nfs4_flag_map[i].p_perm) != 0) {
+                                           (acl_flag_t)acl_nfs4_flag_map[i].p_perm) != 0) {
                                                archive_set_error(a, errno,
                                                    "Failed to add flag to "
                                                    "NFSv4 ACL flagset");
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c:1.3  Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_entry_copy_bhfi.c      Wed May 21 15:25:50 2025
@@ -24,43 +24,24 @@
  */
 
 #include "archive_platform.h"
-
+#include "archive_time_private.h"
 #include "archive_private.h"
 #include "archive_entry.h"
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
 
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
-
-__inline static void
-fileTimeToUtc(const FILETIME *filetime, time_t *t, long *ns)
-{
-       ULARGE_INTEGER utc;
-
-       utc.HighPart = filetime->dwHighDateTime;
-       utc.LowPart  = filetime->dwLowDateTime;
-       if (utc.QuadPart >= EPOC_TIME) {
-               utc.QuadPart -= EPOC_TIME;
-               *t = (time_t)(utc.QuadPart / 10000000); /* milli seconds base */
-               *ns = (long)(utc.QuadPart % 10000000) * 100;/* nano seconds base */
-       } else {
-               *t = 0;
-               *ns = 0;
-       }
-}
-
 void
 archive_entry_copy_bhfi(struct archive_entry *entry,
                        BY_HANDLE_FILE_INFORMATION *bhfi)
 {
-       time_t secs;
-       long nsecs;
+       int64_t secs;
+       uint32_t nsecs;
 
-       fileTimeToUtc(&bhfi->ftLastAccessTime, &secs, &nsecs);
+       ntfs_to_unix(FILETIME_to_ntfs(&bhfi->ftLastAccessTime), &secs, &nsecs);
        archive_entry_set_atime(entry, secs, nsecs);
-       fileTimeToUtc(&bhfi->ftLastWriteTime, &secs, &nsecs);
+       ntfs_to_unix(FILETIME_to_ntfs(&bhfi->ftLastWriteTime), &secs, &nsecs);
        archive_entry_set_mtime(entry, secs, nsecs);
-       fileTimeToUtc(&bhfi->ftCreationTime, &secs, &nsecs);
+       ntfs_to_unix(FILETIME_to_ntfs(&bhfi->ftCreationTime), &secs, &nsecs);
        archive_entry_set_birthtime(entry, secs, nsecs);
        archive_entry_set_ctime(entry, secs, nsecs);
        archive_entry_set_dev(entry, bhfi->dwVolumeSerialNumber);
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_options_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_options_private.h:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_options_private.h:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_options_private.h:1.3  Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_options_private.h      Wed May 21 15:25:51 2025
@@ -35,11 +35,11 @@ typedef int (*option_handler)(struct arc
 int
 _archive_set_option(struct archive *a,
     const char *mod, const char *opt, const char *val,
-    int magic, const char *fn, option_handler use_option);
+    unsigned int magic, const char *fn, option_handler use_option);
 
 int
 _archive_set_options(struct archive *a, const char *options,
-    int magic, const char *fn, option_handler use_option);
+    unsigned int magic, const char *fn, option_handler use_option);
 
 int
 _archive_set_either_option(struct archive *a,
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_platform_acl.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_platform_acl.h:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_platform_acl.h:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_platform_acl.h:1.3     Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_platform_acl.h Wed May 21 15:25:51 2025
@@ -50,4 +50,4 @@
 #define ARCHIVE_ACL_SUPPORT     1
 #endif
 
-#endif /* ARCHIVE_PLATFORM_ACL_H_INCLUDED */
+#endif /* !ARCHIVE_PLATFORM_ACL_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_platform_xattr.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_platform_xattr.h:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_platform_xattr.h:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_platform_xattr.h:1.3   Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_platform_xattr.h       Wed May 21 15:25:51 2025
@@ -42,4 +42,4 @@
 #define ARCHIVE_XATTR_SUPPORT     1
 #endif
 
-#endif /* ARCHIVE_PLATFORM_XATTR_H_INCLUDED */
+#endif /* !ARCHIVE_PLATFORM_XATTR_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_version_details.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_version_details.c:1.3 pkgsrc/archivers/libarchive/files/libarchive/archive_version_details.c:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/archive_version_details.c:1.3  Fri Apr 12 15:39:52 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_version_details.c      Wed May 21 15:25:51 2025
@@ -46,11 +46,125 @@
 #endif
 #ifdef HAVE_ZSTD_H
 #include <zstd.h>
+#include <stdio.h>
+#endif
+#ifdef HAVE_LZO_LZOCONF_H
+#include <lzo/lzoconf.h>
+#endif
+#if HAVE_LIBXML_XMLVERSION_H
+#include <libxml/xmlversion.h>
+#elif HAVE_BSDXML_H
+#include <bsdxml.h>
+#elif HAVE_EXPAT_H
+#include <expat.h>
+#endif
+#if HAVE_MBEDTLS_VERSION_H
+#include <mbedtls/version.h>
+#endif
+#if HAVE_NETTLE_VERSION_H
+#include <nettle/version.h>
+#include <stdio.h>
+#endif
+#if HAVE_OPENSSL_OPENSSLV_H
+#include <openssl/opensslv.h>
+#include <stdio.h>
+#endif
+#if HAVE_ICONV_H
+#include <iconv.h>
+#endif
+#if HAVE_PCRE_H
+#include <pcre.h>
+#endif
+#if HAVE_PCRE2_H
+#include <pcre2.h>
 #endif
 
 #include "archive.h"
 #include "archive_private.h"
 #include "archive_string.h"
+#include "archive_cryptor_private.h"
+#include "archive_digest_private.h"
+
+static void
+archive_regex_version(struct archive_string* str)
+{
+#if HAVE_LIBPCREPOSIX && HAVE_PCRE_H
+       archive_strcat(str, " libpcre/");
+       archive_strcat(str, archive_libpcre_version());
+#elif HAVE_LIBPCRE2POSIX && HAVE_PCRE2_H
+       archive_strcat(str, " libpcre2/");
+       archive_strcat(str, archive_libpcre2_version());
+#else
+       (void)str; /* UNUSED */
+#endif
+}
+
+static void
+archive_xml_version(struct archive_string* str)
+{
+#if HAVE_LIBXML_XMLVERSION_H && HAVE_LIBXML2
+       archive_strcat(str, " libxml2/");
+       archive_strcat(str, archive_libxml2_version());
+#elif HAVE_BSDXML_H && HAVE_LIBBSDXML
+       archive_strcat(str, " bsdxml/");
+       archive_strcat(str, archive_libbsdxml_version());
+#elif HAVE_EXPAT_H && HAVE_LIBEXPAT
+       archive_strcat(str, " expat/");
+       archive_strcat(str, archive_libexpat_version());
+#else
+       (void)str; /* UNUSED */
+#endif
+}
+
+static void
+archive_libb2_version(struct archive_string* str)
+{
+       archive_strcat(str, " libb2/");
+#if HAVE_BLAKE2_H && HAVE_LIBB2
+#if defined(LIBB2_PKGCONFIG_VERSION)
+       archive_strcat(str, LIBB2_PKGCONFIG_VERSION);
+#else
+       archive_strcat(str, "system");
+#endif
+#else
+       archive_strcat(str, "bundled");
+#endif
+}
+
+static void
+archive_crypto_version(struct archive_string* str)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto) || defined(ARCHIVE_DIGEST_USE_Apple_CommonCrypto)
+       archive_strcat(str, " CommonCrypto/");
+       archive_strcat(str, archive_commoncrypto_version());
+#endif
+#if defined(ARCHIVE_CRYPTOR_USE_CNG) || defined(ARCHIVE_DIGEST_USE_CNG)
+       archive_strcat(str, " cng/");
+       archive_strcat(str, archive_cng_version());
+#endif
+#if defined(ARCHIVE_CRYPTOR_USE_MBED) || defined(ARCHIVE_DIGEST_USE_MBED)
+       archive_strcat(str, " mbedtls/");
+       archive_strcat(str, archive_mbedtls_version());
+#endif
+#if defined(ARCHIVE_CRYPTOR_USE_NETTLE) || defined(ARCHIVE_DIGEST_USE_NETTLE)
+       archive_strcat(str, " nettle/");
+       archive_strcat(str, archive_nettle_version());
+#endif
+#if defined(ARCHIVE_CRYPTOR_USE_OPENSSL) || defined(ARCHIVE_DIGEST_USE_OPENSSL)
+       archive_strcat(str, " openssl/");
+       archive_strcat(str, archive_openssl_version());
+#endif
+#if defined(ARCHIVE_CRYPTOR_USE_LIBMD) || defined(ARCHIVE_DIGEST_USE_LIBMD)
+       archive_strcat(str, " libmd/");
+       archive_strcat(str, archive_libmd_version());
+#endif
+#if defined(ARCHIVE_CRYPTOR_USE_WINCRYPT) || defined(ARCHIVE_DIGEST_USE_WINCRYPT)
+       archive_strcat(str, " WinCrypt/");
+       archive_strcat(str, archive_wincrypt_version());
+#endif
+       // Just in case
+       (void)str; /* UNUSED */
+}
 
 const char *
 archive_version_details(void)
@@ -62,12 +176,17 @@ archive_version_details(void)
        const char *bzlib = archive_bzlib_version();
        const char *liblz4 = archive_liblz4_version();
        const char *libzstd = archive_libzstd_version();
+       const char *liblzo = archive_liblzo2_version();
+       const char *libiconv = archive_libiconv_version();
+       const char *libacl = archive_libacl_version();
+       const char *librichacl = archive_librichacl_version();
+       const char *libattr = archive_libacl_version();
 
        if (!init) {
                archive_string_init(&str);
 
                archive_strcat(&str, ARCHIVE_VERSION_STRING);
-               if (zlib != NULL) {
+               if (zlib) {
                        archive_strcat(&str, " zlib/");
                        archive_strcat(&str, zlib);
                }
@@ -91,6 +210,30 @@ archive_version_details(void)
                        archive_strcat(&str, " libzstd/");
                        archive_strcat(&str, libzstd);
                }
+               if (liblzo) {
+                       archive_strcat(&str, " liblzo2/");
+                       archive_strcat(&str, liblzo);
+               }
+               archive_xml_version(&str);
+               archive_regex_version(&str);
+               archive_crypto_version(&str);
+               archive_libb2_version(&str);
+               if (librichacl) {
+                       archive_strcat(&str, " librichacl/");
+                       archive_strcat(&str, librichacl);
+               }
+               if (libacl) {
+                       archive_strcat(&str, " libacl/");
+                       archive_strcat(&str, libacl);
+               }
+               if (libattr) {
+                       archive_strcat(&str, " libattr/");
+                       archive_strcat(&str, libattr);
+               }
+               if (libiconv) {
+                       archive_strcat(&str, " libiconv/");
+                       archive_strcat(&str, libiconv);
+               }
        }
        return str.s;
 }
@@ -98,8 +241,8 @@ archive_version_details(void)
 const char *
 archive_zlib_version(void)
 {
-#ifdef HAVE_ZLIB_H
-       return ZLIB_VERSION;
+#if HAVE_ZLIB_H && HAVE_LIBZ
+       return zlibVersion();
 #else
        return NULL;
 #endif
@@ -108,8 +251,8 @@ archive_zlib_version(void)
 const char *
 archive_liblzma_version(void)
 {
-#ifdef HAVE_LZMA_H
-       return LZMA_VERSION_STRING;
+#if HAVE_LZMA_H && HAVE_LIBLZMA
+       return lzma_version_string();
 #else
        return NULL;
 #endif
@@ -118,7 +261,7 @@ archive_liblzma_version(void)
 const char *
 archive_bzlib_version(void)
 {
-#ifdef HAVE_BZLIB_H
+#if HAVE_BZLIB_H && HAVE_LIBBZ2
        return BZ2_bzlibVersion();
 #else
        return NULL;
@@ -128,12 +271,22 @@ archive_bzlib_version(void)
 const char *
 archive_liblz4_version(void)
 {
-#if defined(HAVE_LZ4_H) && defined(HAVE_LIBLZ4)
+#if HAVE_LZ4_H && HAVE_LIBLZ4
+#if LZ4_VERSION_NUMBER > 10705
+       return LZ4_versionString();
+#elif LZ4_VERSION_NUMBER > 10300
+       div_t major = div(LZ4_versionNumber(), 10000);
+       div_t minor = div(major.rem, 100);
+       static char lz4_version[9];
+       snprintf(lz4_version, 9, "%d.%d.%d", major.quot, minor.quot, minor.rem);
+       return lz4_version;
+#else
 #define str(s) #s
 #define NUMBER(x) str(x)
        return NUMBER(LZ4_VERSION_MAJOR) "." NUMBER(LZ4_VERSION_MINOR) "." NUMBER(LZ4_VERSION_RELEASE);
 #undef NUMBER
 #undef str
+#endif
 #else
        return NULL;
 #endif
@@ -143,7 +296,243 @@ const char *
 archive_libzstd_version(void)
 {
 #if HAVE_ZSTD_H && HAVE_LIBZSTD
-       return ZSTD_VERSION_STRING;
+#if ZSTD_VERSION_NUMBER > 10300
+       return ZSTD_versionString();
+#else
+       div_t major = div(ZSTD_versionNumber(), 10000);
+       div_t minor = div(major.rem, 100);
+       static char zstd_version[9];
+       snprintf(zstd_version, 9, "%d.%d.%d", major.quot, minor.quot, minor.rem);
+       return zstd_version;
+#endif
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_liblzo2_version(void)
+{
+#if HAVE_LZO_LZOCONF_H && HAVE_LIBLZO2
+       return LZO_VERSION_STRING;
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libbsdxml_version(void)
+{
+#if HAVE_BSDXML_H && HAVE_LIBBSDXML
+       return XML_ExpatVersion();
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libxml2_version(void)
+{
+#if HAVE_LIBXML_XMLREADER_H && HAVE_LIBXML2
+       return LIBXML_DOTTED_VERSION;
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libexpat_version(void)
+{
+#if HAVE_EXPAT_H && HAVE_LIBEXPAT
+       return XML_ExpatVersion();
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_mbedtls_version(void)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_MBED) || defined(ARCHIVE_CRYPTO_MBED)
+       static char mbed_version[9];
+       mbedtls_version_get_string(mbed_version);
+       return mbed_version;
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_nettle_version(void)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_NETTLE) || defined(ARCHIVE_CRYPTO_NETTLE)
+       static char nettle_version[6];
+       snprintf(nettle_version, 6, "%d.%d", nettle_version_major(), nettle_version_minor());
+       return nettle_version;
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_openssl_version(void)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_OPENSSL) || defined(ARCHIVE_CRYPTO_OPENSSL)
+#ifdef OPENSSL_VERSION_STR
+       return OPENSSL_VERSION_STR;
+#else
+#define OPENSSL_MAJOR (OPENSSL_VERSION_NUMBER >> 28)
+#define OPENSSL_MINOR ((OPENSSL_VERSION_NUMBER >> 20) & 0xFF)
+       static char openssl_version[6];
+       snprintf(openssl_version, 6, "%ld.%ld", OPENSSL_MAJOR, OPENSSL_MINOR);
+       return openssl_version;
+#undef OPENSSL_MAJOR
+#undef OPENSSL_MINOR
+#endif
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libmd_version(void)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_LIBMD) || defined(ARCHIVE_CRYPTO_LIBMD)
+       return "system";
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_commoncrypto_version(void)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_Apple_CommonCrypto) || defined(ARCHIVE_CRYPTO_CommonCrypto)
+       return "system";
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_cng_version(void)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_CNG) || defined(ARCHIVE_CRYPTO_CNG)
+#ifdef BCRYPT_HASH_INTERFACE_MAJORVERSION_2
+       return "2.0";
+#else
+       return "1.0";
+#endif
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_wincrypt_version(void)
+{
+#if defined(ARCHIVE_CRYPTOR_USE_WINCRYPT) || defined(ARCHIVE_CRYPTO_WINCRYPT)
+       HCRYPTPROV prov;
+       if (!CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
+               if (GetLastError() != (DWORD)NTE_BAD_KEYSET)
+                       return NULL;
+               if (!CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET))
+                       return NULL;
+       }
+       DWORD length, version;
+       if (!CryptGetProvParam(prov, PP_VERSION, &version, &length, 0)) {
+               return NULL;
+       } else {
+               char major = version >> 8;
+               char minor = version & 0xFF;
+               static char wincrypt_version[6];
+               snprintf(wincrypt_version, 6, "%hhd.%hhd", major, minor);
+               return wincrypt_version;
+       }
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_librichacl_version(void)
+{
+#if HAVE_LIBRICHACL
+#if defined(LIBRICHACL_PKGCONFIG_VERSION)
+       return LIBRICHACL_PKGCONFIG_VERSION;
+#else
+       return "system";
+#endif
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libacl_version(void)
+{
+#if HAVE_LIBACL
+#if defined(LIBACL_PKGCONFIG_VERSION)
+       return LIBACL_PKGCONFIG_VERSION;
+#else
+       return "system";
+#endif
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libattr_version(void)
+{
+#if HAVE_LIBATTR
+#if defined(LIBATTR_PKGCONFIG_VERSION)
+       return LIBATTR_PKGCONFIG_VERSION;
+#else
+       return "system";
+#endif
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libiconv_version(void)
+{
+#if HAVE_LIBCHARSET && HAVE_ICONV_H
+       char major = _libiconv_version >> 8;
+       char minor = _libiconv_version & 0xFF;
+       static char charset_version[6];
+       snprintf(charset_version, 6, "%hhd.%hhd", major, minor);
+       return charset_version;
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libpcre_version(void)
+{
+#if HAVE_LIBPCREPOSIX && HAVE_PCRE_H
+#define str(s) #s
+#define NUMBER(x) str(x)
+       return NUMBER(PCRE_MAJOR) "." NUMBER(PCRE_MINOR);
+#undef NUMBER
+#undef str
+#else
+       return NULL;
+#endif
+}
+
+const char *
+archive_libpcre2_version(void)
+{
+#if HAVE_LIBPCRE2POSIX && HAVE_PCRE2_H
+#define str(s) #s
+#define NUMBER(x) str(x)
+       return NUMBER(PCRE2_MAJOR) "." NUMBER(PCRE2_MINOR);
+#undef NUMBER
+#undef str
 #else
        return NULL;
 #endif

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_digest.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_digest.c:1.4 pkgsrc/archivers/libarchive/files/libarchive/archive_digest.c:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/archive_digest.c:1.4   Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_digest.c       Wed May 21 15:25:50 2025
@@ -229,13 +229,42 @@ __archive_md5final(archive_md5_ctx *ctx,
 #pragma clang diagnostic pop
 #endif
 
+#elif defined(ARCHIVE_CRYPTO_MD5_WIN)
+
+static int
+__archive_md5init(archive_md5_ctx *ctx)
+{
+#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
+  return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM));
+#else
+  return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5));
+#endif
+}
+
+static int
+__archive_md5update(archive_md5_ctx *ctx, const void *indata,
+    size_t insize)
+{
+  return (win_crypto_Update(ctx, indata, insize));
+}
+
+static int
+__archive_md5final(archive_md5_ctx *ctx, void *md)
+{
+  return (win_crypto_Final(md, 16, ctx));
+}
+
 #elif defined(ARCHIVE_CRYPTO_MD5_MBEDTLS)
 
 static int
 __archive_md5init(archive_md5_ctx *ctx)
 {
   mbedtls_md5_init(ctx);
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_md5_starts(ctx) == 0)
+#else
   if (mbedtls_md5_starts_ret(ctx) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -245,7 +274,11 @@ static int
 __archive_md5update(archive_md5_ctx *ctx, const void *indata,
     size_t insize)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_md5_update(ctx, indata, insize) == 0)
+#else
   if (mbedtls_md5_update_ret(ctx, indata, insize) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -254,7 +287,11 @@ __archive_md5update(archive_md5_ctx *ctx
 static int
 __archive_md5final(archive_md5_ctx *ctx, void *md)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_md5_finish(ctx, md) == 0) {
+#else
   if (mbedtls_md5_finish_ret(ctx, md) == 0) {
+#endif
     mbedtls_md5_free(ctx);
     return (ARCHIVE_OK);
   } else {
@@ -322,31 +359,6 @@ __archive_md5final(archive_md5_ctx *ctx,
   return (ARCHIVE_OK);
 }
 
-#elif defined(ARCHIVE_CRYPTO_MD5_WIN)
-
-static int
-__archive_md5init(archive_md5_ctx *ctx)
-{
-#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
-  return (win_crypto_init(ctx, BCRYPT_MD5_ALGORITHM));
-#else
-  return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_MD5));
-#endif
-}
-
-static int
-__archive_md5update(archive_md5_ctx *ctx, const void *indata,
-    size_t insize)
-{
-  return (win_crypto_Update(ctx, indata, insize));
-}
-
-static int
-__archive_md5final(archive_md5_ctx *ctx, void *md)
-{
-  return (win_crypto_Final(md, 16, ctx));
-}
-
 #else
 
 static int
@@ -431,7 +443,11 @@ static int
 __archive_ripemd160init(archive_rmd160_ctx *ctx)
 {
   mbedtls_ripemd160_init(ctx);
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_ripemd160_starts(ctx) == 0)
+#else
   if (mbedtls_ripemd160_starts_ret(ctx) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -441,7 +457,11 @@ static int
 __archive_ripemd160update(archive_rmd160_ctx *ctx, const void *indata,
     size_t insize)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_ripemd160_update(ctx, indata, insize) == 0)
+#else
   if (mbedtls_ripemd160_update_ret(ctx, indata, insize) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -450,7 +470,11 @@ __archive_ripemd160update(archive_rmd160
 static int
 __archive_ripemd160final(archive_rmd160_ctx *ctx, void *md)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_ripemd160_finish(ctx, md) == 0) {
+#else
   if (mbedtls_ripemd160_finish_ret(ctx, md) == 0) {
+#endif
     mbedtls_ripemd160_free(ctx);
     return (ARCHIVE_OK);
   } else {
@@ -616,13 +640,42 @@ __archive_sha1final(archive_sha1_ctx *ct
   return (ARCHIVE_OK);
 }
 
+#elif defined(ARCHIVE_CRYPTO_SHA1_WIN)
+
+static int
+__archive_sha1init(archive_sha1_ctx *ctx)
+{
+#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
+  return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM));
+#else
+  return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1));
+#endif
+}
+
+static int
+__archive_sha1update(archive_sha1_ctx *ctx, const void *indata,
+    size_t insize)
+{
+  return (win_crypto_Update(ctx, indata, insize));
+}
+
+static int
+__archive_sha1final(archive_sha1_ctx *ctx, void *md)
+{
+  return (win_crypto_Final(md, 20, ctx));
+}
+
 #elif defined(ARCHIVE_CRYPTO_SHA1_MBEDTLS)
 
 static int
 __archive_sha1init(archive_sha1_ctx *ctx)
 {
   mbedtls_sha1_init(ctx);
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha1_starts(ctx) == 0)
+#else
   if (mbedtls_sha1_starts_ret(ctx) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -632,7 +685,11 @@ static int
 __archive_sha1update(archive_sha1_ctx *ctx, const void *indata,
     size_t insize)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha1_update(ctx, indata, insize) == 0)
+#else
   if (mbedtls_sha1_update_ret(ctx, indata, insize) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -641,7 +698,11 @@ __archive_sha1update(archive_sha1_ctx *c
 static int
 __archive_sha1final(archive_sha1_ctx *ctx, void *md)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha1_finish(ctx, md) == 0) {
+#else
   if (mbedtls_sha1_finish_ret(ctx, md) == 0) {
+#endif
     mbedtls_sha1_free(ctx);
     return (ARCHIVE_OK);
   } else {
@@ -709,31 +770,6 @@ __archive_sha1final(archive_sha1_ctx *ct
   return (ARCHIVE_OK);
 }
 
-#elif defined(ARCHIVE_CRYPTO_SHA1_WIN)
-
-static int
-__archive_sha1init(archive_sha1_ctx *ctx)
-{
-#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
-  return (win_crypto_init(ctx, BCRYPT_SHA1_ALGORITHM));
-#else
-  return (win_crypto_init(ctx, PROV_RSA_FULL, CALG_SHA1));
-#endif
-}
-
-static int
-__archive_sha1update(archive_sha1_ctx *ctx, const void *indata,
-    size_t insize)
-{
-  return (win_crypto_Update(ctx, indata, insize));
-}
-
-static int
-__archive_sha1final(archive_sha1_ctx *ctx, void *md)
-{
-  return (win_crypto_Final(md, 20, ctx));
-}
-
 #else
 
 static int
@@ -884,13 +920,42 @@ __archive_sha256final(archive_sha256_ctx
   return (ARCHIVE_OK);
 }
 
+#elif defined(ARCHIVE_CRYPTO_SHA256_WIN)
+
+static int
+__archive_sha256init(archive_sha256_ctx *ctx)
+{
+#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
+  return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM));
+#else
+  return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256));
+#endif
+}
+
+static int
+__archive_sha256update(archive_sha256_ctx *ctx, const void *indata,
+    size_t insize)
+{
+  return (win_crypto_Update(ctx, indata, insize));
+}
+
+static int
+__archive_sha256final(archive_sha256_ctx *ctx, void *md)
+{
+  return (win_crypto_Final(md, 32, ctx));
+}
+
 #elif defined(ARCHIVE_CRYPTO_SHA256_MBEDTLS)
 
 static int
 __archive_sha256init(archive_sha256_ctx *ctx)
 {
   mbedtls_sha256_init(ctx);
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha256_starts(ctx, 0) == 0)
+#else
   if (mbedtls_sha256_starts_ret(ctx, 0) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -900,7 +965,11 @@ static int
 __archive_sha256update(archive_sha256_ctx *ctx, const void *indata,
     size_t insize)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha256_update(ctx, indata, insize) == 0)
+#else
   if (mbedtls_sha256_update_ret(ctx, indata, insize) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -909,7 +978,11 @@ __archive_sha256update(archive_sha256_ct
 static int
 __archive_sha256final(archive_sha256_ctx *ctx, void *md)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha256_finish(ctx, md) == 0) {
+#else
   if (mbedtls_sha256_finish_ret(ctx, md) == 0) {
+#endif
     mbedtls_sha256_free(ctx);
     return (ARCHIVE_OK);
   } else {
@@ -973,31 +1046,6 @@ __archive_sha256final(archive_sha256_ctx
   return (ARCHIVE_OK);
 }
 
-#elif defined(ARCHIVE_CRYPTO_SHA256_WIN)
-
-static int
-__archive_sha256init(archive_sha256_ctx *ctx)
-{
-#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
-  return (win_crypto_init(ctx, BCRYPT_SHA256_ALGORITHM));
-#else
-  return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_256));
-#endif
-}
-
-static int
-__archive_sha256update(archive_sha256_ctx *ctx, const void *indata,
-    size_t insize)
-{
-  return (win_crypto_Update(ctx, indata, insize));
-}
-
-static int
-__archive_sha256final(archive_sha256_ctx *ctx, void *md)
-{
-  return (win_crypto_Final(md, 32, ctx));
-}
-
 #else
 
 static int
@@ -1124,13 +1172,42 @@ __archive_sha384final(archive_sha384_ctx
   return (ARCHIVE_OK);
 }
 
+#elif defined(ARCHIVE_CRYPTO_SHA384_WIN)
+
+static int
+__archive_sha384init(archive_sha384_ctx *ctx)
+{
+#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
+  return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM));
+#else
+  return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384));
+#endif
+}
+
+static int
+__archive_sha384update(archive_sha384_ctx *ctx, const void *indata,
+    size_t insize)
+{
+  return (win_crypto_Update(ctx, indata, insize));
+}
+
+static int
+__archive_sha384final(archive_sha384_ctx *ctx, void *md)
+{
+  return (win_crypto_Final(md, 48, ctx));
+}
+
 #elif defined(ARCHIVE_CRYPTO_SHA384_MBEDTLS)
 
 static int
 __archive_sha384init(archive_sha384_ctx *ctx)
 {
   mbedtls_sha512_init(ctx);
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha512_starts(ctx, 1) == 0)
+#else
   if (mbedtls_sha512_starts_ret(ctx, 1) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -1140,7 +1217,11 @@ static int
 __archive_sha384update(archive_sha384_ctx *ctx, const void *indata,
     size_t insize)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha512_update(ctx, indata, insize) == 0)
+#else
   if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -1149,7 +1230,11 @@ __archive_sha384update(archive_sha384_ct
 static int
 __archive_sha384final(archive_sha384_ctx *ctx, void *md)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha512_finish(ctx, md) == 0) {
+#else
   if (mbedtls_sha512_finish_ret(ctx, md) == 0) {
+#endif
     mbedtls_sha512_free(ctx);
     return (ARCHIVE_OK);
   } else {
@@ -1213,31 +1298,6 @@ __archive_sha384final(archive_sha384_ctx
   return (ARCHIVE_OK);
 }
 
-#elif defined(ARCHIVE_CRYPTO_SHA384_WIN)
-
-static int
-__archive_sha384init(archive_sha384_ctx *ctx)
-{
-#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
-  return (win_crypto_init(ctx, BCRYPT_SHA384_ALGORITHM));
-#else
-  return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_384));
-#endif
-}
-
-static int
-__archive_sha384update(archive_sha384_ctx *ctx, const void *indata,
-    size_t insize)
-{
-  return (win_crypto_Update(ctx, indata, insize));
-}
-
-static int
-__archive_sha384final(archive_sha384_ctx *ctx, void *md)
-{
-  return (win_crypto_Final(md, 48, ctx));
-}
-
 #else
 
 static int
@@ -1388,13 +1448,42 @@ __archive_sha512final(archive_sha512_ctx
   return (ARCHIVE_OK);
 }
 
+#elif defined(ARCHIVE_CRYPTO_SHA512_WIN)
+
+static int
+__archive_sha512init(archive_sha512_ctx *ctx)
+{
+#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
+  return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM));
+#else
+  return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512));
+#endif
+}
+
+static int
+__archive_sha512update(archive_sha512_ctx *ctx, const void *indata,
+    size_t insize)
+{
+  return (win_crypto_Update(ctx, indata, insize));
+}
+
+static int
+__archive_sha512final(archive_sha512_ctx *ctx, void *md)
+{
+  return (win_crypto_Final(md, 64, ctx));
+}
+
 #elif defined(ARCHIVE_CRYPTO_SHA512_MBEDTLS)
 
 static int
 __archive_sha512init(archive_sha512_ctx *ctx)
 {
   mbedtls_sha512_init(ctx);
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha512_starts(ctx, 0) == 0)
+#else
   if (mbedtls_sha512_starts_ret(ctx, 0) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -1404,7 +1493,11 @@ static int
 __archive_sha512update(archive_sha512_ctx *ctx, const void *indata,
     size_t insize)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha512_update(ctx, indata, insize) == 0)
+#else
   if (mbedtls_sha512_update_ret(ctx, indata, insize) == 0)
+#endif
     return (ARCHIVE_OK);
   else
     return (ARCHIVE_FATAL);
@@ -1413,7 +1506,11 @@ __archive_sha512update(archive_sha512_ct
 static int
 __archive_sha512final(archive_sha512_ctx *ctx, void *md)
 {
+#if MBEDTLS_VERSION_NUMBER > 0x03000000
+  if (mbedtls_sha512_finish(ctx, md) == 0) {
+#else
   if (mbedtls_sha512_finish_ret(ctx, md) == 0) {
+#endif
     mbedtls_sha512_free(ctx);
     return (ARCHIVE_OK);
   } else {
@@ -1477,31 +1574,6 @@ __archive_sha512final(archive_sha512_ctx
   return (ARCHIVE_OK);
 }
 
-#elif defined(ARCHIVE_CRYPTO_SHA512_WIN)
-
-static int
-__archive_sha512init(archive_sha512_ctx *ctx)
-{
-#if defined(HAVE_BCRYPT_H) && _WIN32_WINNT >= _WIN32_WINNT_VISTA
-  return (win_crypto_init(ctx, BCRYPT_SHA512_ALGORITHM));
-#else
-  return (win_crypto_init(ctx, PROV_RSA_AES, CALG_SHA_512));
-#endif
-}
-
-static int
-__archive_sha512update(archive_sha512_ctx *ctx, const void *indata,
-    size_t insize)
-{
-  return (win_crypto_Update(ctx, indata, insize));
-}
-
-static int
-__archive_sha512final(archive_sha512_ctx *ctx, void *md)
-{
-  return (win_crypto_Final(md, 64, ctx));
-}
-
 #else
 
 static int
@@ -1536,11 +1608,12 @@ __archive_sha512final(archive_sha512_ctx
  * 1. libc
  * 2. libc2
  * 3. libc3
- * 4. libSystem
- * 5. Nettle
- * 6. OpenSSL
- * 7. libmd
- * 8. Windows API
+ * 4. libmd
+ * 5. libSystem
+ * 6. Windows API
+ * 7. mbedTLS
+ * 8. Nettle
+ * 9. OpenSSL
  */
 const struct archive_digest __archive_digest =
 {
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_locale.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_entry_locale.h:1.4 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_locale.h:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/archive_entry_locale.h:1.4     Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_entry_locale.h Wed May 21 15:25:50 2025
@@ -87,4 +87,4 @@ int _archive_entry_copy_symlink_l(struct
 int _archive_entry_copy_uname_l(struct archive_entry *,
     const char *, size_t, struct archive_string_conv *);
 
-#endif /* ARCHIVE_ENTRY_LOCALE_H_INCLUDED */
+#endif /* !ARCHIVE_ENTRY_LOCALE_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_hmac_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_hmac_private.h:1.4 pkgsrc/archivers/libarchive/files/libarchive/archive_hmac_private.h:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/archive_hmac_private.h:1.4     Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_hmac_private.h Wed May 21 15:25:51 2025
@@ -116,4 +116,4 @@ struct archive_hmac {
 };
 
 extern const struct archive_hmac __archive_hmac;
-#endif /* ARCHIVE_HMAC_PRIVATE_H_INCLUDED */
+#endif /* !ARCHIVE_HMAC_PRIVATE_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_options.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_options.c:1.4 pkgsrc/archivers/libarchive/files/libarchive/archive_options.c:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/archive_options.c:1.4  Fri Apr 12 15:39:50 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_options.c      Wed May 21 15:25:51 2025
@@ -38,7 +38,7 @@ parse_option(const char **str,
 int
 _archive_set_option(struct archive *a,
     const char *m, const char *o, const char *v,
-    int magic, const char *fn, option_handler use_option)
+    unsigned int magic, const char *fn, option_handler use_option)
 {
        const char *mp, *op, *vp;
        int r;
@@ -97,7 +97,7 @@ _archive_set_either_option(struct archiv
 
 int
 _archive_set_options(struct archive *a, const char *options,
-    int magic, const char *fn, option_handler use_option)
+    unsigned int magic, const char *fn, option_handler use_option)
 {
        int allok = 1, anyok = 0, ignore_mod_err = 0, r;
        char *data;
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_format.3
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_format.3:1.4 pkgsrc/archivers/libarchive/files/libarchive/archive_read_format.3:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_format.3:1.4      Fri Apr 12 15:39:51 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_format.3  Wed May 21 15:25:51 2025
@@ -37,8 +37,10 @@
 .Nm archive_read_support_format_lha ,
 .Nm archive_read_support_format_mtree ,
 .Nm archive_read_support_format_rar ,
+.Nm archive_read_support_format_rar5 ,
 .Nm archive_read_support_format_raw ,
 .Nm archive_read_support_format_tar ,
+.Nm archive_read_support_format_warc ,
 .Nm archive_read_support_format_xar ,
 .Nm archive_read_support_format_zip
 .Nd functions for reading streaming archives
@@ -70,10 +72,14 @@ Streaming Archive Library (libarchive, -
 .Ft int
 .Fn archive_read_support_format_rar "struct archive *"
 .Ft int
+.Fn archive_read_support_format_rar5 "struct archive *"
+.Ft int
 .Fn archive_read_support_format_raw "struct archive *"
 .Ft int
 .Fn archive_read_support_format_tar "struct archive *"
 .Ft int
+.Fn archive_read_support_format_warc "struct archive *"
+.Ft int
 .Fn archive_read_support_format_xar "struct archive *"
 .Ft int
 .Fn archive_read_support_format_zip "struct archive *"
@@ -89,8 +95,10 @@ Streaming Archive Library (libarchive, -
 .Fn archive_read_support_format_lha ,
 .Fn archive_read_support_format_mtree ,
 .Fn archive_read_support_format_rar ,
+.Fn archive_read_support_format_rar5 ,
 .Fn archive_read_support_format_raw ,
 .Fn archive_read_support_format_tar ,
+.Fn archive_read_support_format_warc ,
 .Fn archive_read_support_format_xar ,
 .Fn archive_read_support_format_zip
 .Xc
@@ -100,6 +108,13 @@ For example,
 .Fn archive_read_support_format_tar
 enables support for a variety of standard tar formats, old-style tar,
 ustar, pax interchange format, and many common variants.
+.Fn archive_read_support_format_zip
+enables support for both the streaming and the seeking zip readers,
+which can separately be enabled by respectively
+.Fn archive_read_support_format_zip_streamable
+and
+.Fn archive_read_support_format_zip_seekable
+.
 .It Fn archive_read_support_format_all
 Enables support for all available formats except the
 .Dq raw
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_string_composition.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_string_composition.h:1.4 pkgsrc/archivers/libarchive/files/libarchive/archive_string_composition.h:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/archive_string_composition.h:1.4       Fri Apr 12 15:39:51 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_string_composition.h   Wed May 21 15:25:51 2025
@@ -2286,5 +2286,4 @@ static const struct unicode_decompositio
        { 0x110AB , 0x110A5 , 0x110BA },
 };
 
-#endif /* ARCHIVE_STRING_COMPOSITION_H_INCLUDED */
-
+#endif /* !ARCHIVE_STRING_COMPOSITION_H_INCLUDED */

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_entry.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_entry.c:1.16 pkgsrc/archivers/libarchive/files/libarchive/archive_entry.c:1.17
--- pkgsrc/archivers/libarchive/files/libarchive/archive_entry.c:1.16   Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_entry.c        Wed May 21 15:25:50 2025
@@ -275,7 +275,7 @@ archive_entry_new2(struct archive *a)
  * Functions for reading fields from an archive_entry.
  */
 
-time_t
+__LA_TIME_T
 archive_entry_atime(struct archive_entry *entry)
 {
        return (entry->ae_stat.aest_atime);
@@ -293,7 +293,7 @@ archive_entry_atime_is_set(struct archiv
        return (entry->ae_set & AE_SET_ATIME);
 }
 
-time_t
+__LA_TIME_T
 archive_entry_birthtime(struct archive_entry *entry)
 {
        return (entry->ae_stat.aest_birthtime);
@@ -311,7 +311,7 @@ archive_entry_birthtime_is_set(struct ar
        return (entry->ae_set & AE_SET_BIRTHTIME);
 }
 
-time_t
+__LA_TIME_T
 archive_entry_ctime(struct archive_entry *entry)
 {
        return (entry->ae_stat.aest_ctime);
@@ -329,7 +329,7 @@ archive_entry_ctime_nsec(struct archive_
        return (entry->ae_stat.aest_ctime_nsec);
 }
 
-dev_t
+__LA_DEV_T
 archive_entry_dev(struct archive_entry *entry)
 {
        if (entry->ae_stat.aest_dev_is_broken_down)
@@ -345,7 +345,7 @@ archive_entry_dev_is_set(struct archive_
        return (entry->ae_set & AE_SET_DEV);
 }
 
-dev_t
+__LA_DEV_T
 archive_entry_devmajor(struct archive_entry *entry)
 {
        if (entry->ae_stat.aest_dev_is_broken_down)
@@ -354,7 +354,7 @@ archive_entry_devmajor(struct archive_en
                return major(entry->ae_stat.aest_dev);
 }
 
-dev_t
+__LA_DEV_T
 archive_entry_devminor(struct archive_entry *entry)
 {
        if (entry->ae_stat.aest_dev_is_broken_down)
@@ -568,7 +568,7 @@ archive_entry_mode(struct archive_entry 
        return (entry->acl.mode);
 }
 
-time_t
+__LA_TIME_T
 archive_entry_mtime(struct archive_entry *entry)
 {
        return (entry->ae_stat.aest_mtime);
@@ -667,7 +667,7 @@ archive_entry_rdev_is_set(struct archive
        return (entry->ae_set & AE_SET_RDEV);
 }
 
-dev_t
+__LA_DEV_T
 archive_entry_rdev(struct archive_entry *entry)
 {
        if (archive_entry_rdev_is_set(entry)) {
@@ -681,7 +681,7 @@ archive_entry_rdev(struct archive_entry 
        }
 }
 
-dev_t
+__LA_DEV_T
 archive_entry_rdevmajor(struct archive_entry *entry)
 {
        if (archive_entry_rdev_is_set(entry)) {
@@ -694,7 +694,7 @@ archive_entry_rdevmajor(struct archive_e
        }
 }
 
-dev_t
+__LA_DEV_T
 archive_entry_rdevminor(struct archive_entry *entry)
 {
        if (archive_entry_rdev_is_set(entry)) {
@@ -984,7 +984,9 @@ void
 archive_entry_set_ino(struct archive_entry *entry, la_int64_t ino)
 {
        if (ino < 0) {
-               ino = 0;
+               entry->stat_valid = 0;
+               entry->ae_set &= ~AE_SET_INO;
+               return;
        }
        entry->stat_valid = 0;
        entry->ae_set |= AE_SET_INO;
@@ -995,7 +997,9 @@ void
 archive_entry_set_ino64(struct archive_entry *entry, la_int64_t ino)
 {
        if (ino < 0) {
-               ino = 0;
+               entry->stat_valid = 0;
+               entry->ae_set &= ~AE_SET_INO;
+               return;
        }
        entry->stat_valid = 0;
        entry->ae_set |= AE_SET_INO;
@@ -1088,7 +1092,7 @@ _archive_entry_copy_hardlink_l(struct ar
 }
 
 void
-archive_entry_set_atime(struct archive_entry *entry, time_t t, long ns)
+archive_entry_set_atime(struct archive_entry *entry, __LA_TIME_T t, long ns)
 {
        FIX_NS(t, ns);
        entry->stat_valid = 0;
@@ -1105,7 +1109,7 @@ archive_entry_unset_atime(struct archive
 }
 
 void
-archive_entry_set_birthtime(struct archive_entry *entry, time_t t, long ns)
+archive_entry_set_birthtime(struct archive_entry *entry, __LA_TIME_T t, long ns)
 {
        FIX_NS(t, ns);
        entry->stat_valid = 0;
@@ -1122,7 +1126,7 @@ archive_entry_unset_birthtime(struct arc
 }
 
 void
-archive_entry_set_ctime(struct archive_entry *entry, time_t t, long ns)
+archive_entry_set_ctime(struct archive_entry *entry, __LA_TIME_T t, long ns)
 {
        FIX_NS(t, ns);
        entry->stat_valid = 0;
@@ -1139,7 +1143,7 @@ archive_entry_unset_ctime(struct archive
 }
 
 void
-archive_entry_set_dev(struct archive_entry *entry, dev_t d)
+archive_entry_set_dev(struct archive_entry *entry, __LA_DEV_T d)
 {
        entry->stat_valid = 0;
        entry->ae_set |= AE_SET_DEV;
@@ -1148,7 +1152,7 @@ archive_entry_set_dev(struct archive_ent
 }
 
 void
-archive_entry_set_devmajor(struct archive_entry *entry, dev_t m)
+archive_entry_set_devmajor(struct archive_entry *entry, __LA_DEV_T m)
 {
        entry->stat_valid = 0;
        entry->ae_set |= AE_SET_DEV;
@@ -1157,7 +1161,7 @@ archive_entry_set_devmajor(struct archiv
 }
 
 void
-archive_entry_set_devminor(struct archive_entry *entry, dev_t m)
+archive_entry_set_devminor(struct archive_entry *entry, __LA_DEV_T m)
 {
        entry->stat_valid = 0;
        entry->ae_set |= AE_SET_DEV;
@@ -1243,7 +1247,7 @@ archive_entry_set_mode(struct archive_en
 }
 
 void
-archive_entry_set_mtime(struct archive_entry *entry, time_t t, long ns)
+archive_entry_set_mtime(struct archive_entry *entry, __LA_TIME_T t, long ns)
 {
        FIX_NS(t, ns);
        entry->stat_valid = 0;
@@ -1319,7 +1323,7 @@ archive_entry_set_perm(struct archive_en
 }
 
 void
-archive_entry_set_rdev(struct archive_entry *entry, dev_t m)
+archive_entry_set_rdev(struct archive_entry *entry, __LA_DEV_T m)
 {
        entry->stat_valid = 0;
        entry->ae_stat.aest_rdev = m;
@@ -1330,7 +1334,7 @@ archive_entry_set_rdev(struct archive_en
 }
 
 void
-archive_entry_set_rdevmajor(struct archive_entry *entry, dev_t m)
+archive_entry_set_rdevmajor(struct archive_entry *entry, __LA_DEV_T m)
 {
        entry->stat_valid = 0;
        entry->ae_stat.aest_rdev_is_broken_down = 1;
@@ -1340,7 +1344,7 @@ archive_entry_set_rdevmajor(struct archi
 }
 
 void
-archive_entry_set_rdevminor(struct archive_entry *entry, dev_t m)
+archive_entry_set_rdevminor(struct archive_entry *entry, __LA_DEV_T m)
 {
        entry->stat_valid = 0;
        entry->ae_stat.aest_rdev_is_broken_down = 1;
@@ -1603,21 +1607,27 @@ archive_entry_set_digest(struct archive_
        switch (type) {
        case ARCHIVE_ENTRY_DIGEST_MD5:
                copy_digest(entry, md5, digest);
+               entry->mset_digest |= AE_MSET_DIGEST_MD5;
                break;
        case ARCHIVE_ENTRY_DIGEST_RMD160:
                copy_digest(entry, rmd160, digest);
+               entry->mset_digest |= AE_MSET_DIGEST_RMD160;
                break;
        case ARCHIVE_ENTRY_DIGEST_SHA1:
                copy_digest(entry, sha1, digest);
+               entry->mset_digest |= AE_MSET_DIGEST_SHA1;
                break;
        case ARCHIVE_ENTRY_DIGEST_SHA256:
                copy_digest(entry, sha256, digest);
+               entry->mset_digest |= AE_MSET_DIGEST_SHA256;
                break;
        case ARCHIVE_ENTRY_DIGEST_SHA384:
                copy_digest(entry, sha384, digest);
+               entry->mset_digest |= AE_MSET_DIGEST_SHA384;
                break;
        case ARCHIVE_ENTRY_DIGEST_SHA512:
                copy_digest(entry, sha512, digest);
+               entry->mset_digest |= AE_MSET_DIGEST_SHA512;
                break;
        default:
                return ARCHIVE_WARN;
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h:1.16 pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h:1.17
--- pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h:1.16   Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_entry.h        Wed May 21 15:25:50 2025
@@ -28,7 +28,7 @@
 #define        ARCHIVE_ENTRY_H_INCLUDED
 
 /* Note: Compiler will complain if this does not match archive.h! */
-#define        ARCHIVE_VERSION_NUMBER 3007009
+#define        ARCHIVE_VERSION_NUMBER 3008000
 
 /*
  * Note: archive_entry.h is for use outside of libarchive; the
@@ -40,8 +40,11 @@
 
 #include <sys/types.h>
 #include <stddef.h>  /* for wchar_t */
-#include <stdint.h>
+#include <stdint.h>  /* for C99 int64_t, etc. */
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* time_t is slated to be removed from public includes in 4.0 */
 #include <time.h>
+#endif
 
 #if defined(_WIN32) && !defined(__CYGWIN__)
 #include <windows.h>
@@ -55,12 +58,15 @@
 #define __LA_INT64_T_DEFINED
 # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
 typedef __int64 la_int64_t;
+typedef unsigned __int64 la_uint64_t;
 # else
 #include <unistd.h>
 #  if defined(_SCO_DS) || defined(__osf__)
 typedef long long la_int64_t;
+typedef unsigned long long la_uint64_t;
 #  else
 typedef int64_t la_int64_t;
+typedef uint64_t la_uint64_t;
 #  endif
 # endif
 #endif
@@ -96,6 +102,30 @@ typedef ssize_t la_ssize_t;
 # define       __LA_MODE_T     mode_t
 #endif
 
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* Use the platform types for time_t */
+#define __LA_TIME_T time_t
+#else
+/* Use 64-bits integer types for time_t */
+#define __LA_TIME_T la_int64_t
+#endif
+
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* Use the platform types for dev_t */
+#define __LA_DEV_T dev_t
+#else
+/* Use 64-bits integer types for dev_t */
+#define __LA_DEV_T la_int64_t
+#endif
+
+#if ARCHIVE_VERSION_NUMBER < 4000000
+/* Libarchive 3.x used signed int64 for inode numbers */
+#define __LA_INO_T la_int64_t
+#else
+/* Switch to unsigned for libarchive 4.0 */
+#define __LA_INO_T la_uint64_t
+#endif
+
 /* Large file support for Android */
 #if defined(__LIBARCHIVE_BUILD) && defined(__ANDROID__)
 #include "android_lf.h"
@@ -236,19 +266,19 @@ __LA_DECL struct archive_entry    *archive_
  * also return NULL when implicit character set conversions fail.
  * This is usually what you want.
  */
-__LA_DECL time_t        archive_entry_atime(struct archive_entry *);
+__LA_DECL __LA_TIME_T   archive_entry_atime(struct archive_entry *);
 __LA_DECL long          archive_entry_atime_nsec(struct archive_entry *);
 __LA_DECL int           archive_entry_atime_is_set(struct archive_entry *);
-__LA_DECL time_t        archive_entry_birthtime(struct archive_entry *);
+__LA_DECL __LA_TIME_T   archive_entry_birthtime(struct archive_entry *);
 __LA_DECL long          archive_entry_birthtime_nsec(struct archive_entry *);
 __LA_DECL int           archive_entry_birthtime_is_set(struct archive_entry *);
-__LA_DECL time_t        archive_entry_ctime(struct archive_entry *);
+__LA_DECL __LA_TIME_T   archive_entry_ctime(struct archive_entry *);
 __LA_DECL long          archive_entry_ctime_nsec(struct archive_entry *);
 __LA_DECL int           archive_entry_ctime_is_set(struct archive_entry *);
-__LA_DECL dev_t                 archive_entry_dev(struct archive_entry *);
+__LA_DECL __LA_DEV_T            archive_entry_dev(struct archive_entry *);
 __LA_DECL int           archive_entry_dev_is_set(struct archive_entry *);
-__LA_DECL dev_t                 archive_entry_devmajor(struct archive_entry *);
-__LA_DECL dev_t                 archive_entry_devminor(struct archive_entry *);
+__LA_DECL __LA_DEV_T            archive_entry_devmajor(struct archive_entry *);
+__LA_DECL __LA_DEV_T            archive_entry_devminor(struct archive_entry *);
 __LA_DECL __LA_MODE_T   archive_entry_filetype(struct archive_entry *);
 __LA_DECL int           archive_entry_filetype_is_set(struct archive_entry *);
 __LA_DECL void          archive_entry_fflags(struct archive_entry *,
@@ -265,8 +295,8 @@ __LA_DECL const char        *archive_entry_hard
 __LA_DECL const char   *archive_entry_hardlink_utf8(struct archive_entry *);
 __LA_DECL const wchar_t        *archive_entry_hardlink_w(struct archive_entry *);
 __LA_DECL int           archive_entry_hardlink_is_set(struct archive_entry *);
-__LA_DECL la_int64_t    archive_entry_ino(struct archive_entry *);
-__LA_DECL la_int64_t    archive_entry_ino64(struct archive_entry *);
+__LA_DECL __LA_INO_T    archive_entry_ino(struct archive_entry *);
+__LA_DECL __LA_INO_T    archive_entry_ino64(struct archive_entry *);
 __LA_DECL int           archive_entry_ino_is_set(struct archive_entry *);
 __LA_DECL __LA_MODE_T   archive_entry_mode(struct archive_entry *);
 __LA_DECL time_t        archive_entry_mtime(struct archive_entry *);
@@ -279,9 +309,9 @@ __LA_DECL const wchar_t     *archive_entry_p
 __LA_DECL __LA_MODE_T   archive_entry_perm(struct archive_entry *);
 __LA_DECL int           archive_entry_perm_is_set(struct archive_entry *);
 __LA_DECL int           archive_entry_rdev_is_set(struct archive_entry *);
-__LA_DECL dev_t                 archive_entry_rdev(struct archive_entry *);
-__LA_DECL dev_t                 archive_entry_rdevmajor(struct archive_entry *);
-__LA_DECL dev_t                 archive_entry_rdevminor(struct archive_entry *);
+__LA_DECL __LA_DEV_T            archive_entry_rdev(struct archive_entry *);
+__LA_DECL __LA_DEV_T            archive_entry_rdevmajor(struct archive_entry *);
+__LA_DECL __LA_DEV_T            archive_entry_rdevminor(struct archive_entry *);
 __LA_DECL const char   *archive_entry_sourcepath(struct archive_entry *);
 __LA_DECL const wchar_t        *archive_entry_sourcepath_w(struct archive_entry *);
 __LA_DECL la_int64_t    archive_entry_size(struct archive_entry *);
@@ -310,18 +340,18 @@ __LA_DECL int archive_entry_is_encrypted
  * always copied.
  */
 
-__LA_DECL void archive_entry_set_atime(struct archive_entry *, time_t, long);
+__LA_DECL void archive_entry_set_atime(struct archive_entry *, __LA_TIME_T, long);
 __LA_DECL void  archive_entry_unset_atime(struct archive_entry *);
 #if defined(_WIN32) && !defined(__CYGWIN__)
 __LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, BY_HANDLE_FILE_INFORMATION *);
 #endif
-__LA_DECL void archive_entry_set_birthtime(struct archive_entry *, time_t, long);
+__LA_DECL void archive_entry_set_birthtime(struct archive_entry *, __LA_TIME_T, long);
 __LA_DECL void  archive_entry_unset_birthtime(struct archive_entry *);
-__LA_DECL void archive_entry_set_ctime(struct archive_entry *, time_t, long);
+__LA_DECL void archive_entry_set_ctime(struct archive_entry *, __LA_TIME_T, long);
 __LA_DECL void  archive_entry_unset_ctime(struct archive_entry *);
-__LA_DECL void archive_entry_set_dev(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_devminor(struct archive_entry *, dev_t);
+__LA_DECL void archive_entry_set_dev(struct archive_entry *, __LA_DEV_T);
+__LA_DECL void archive_entry_set_devmajor(struct archive_entry *, __LA_DEV_T);
+__LA_DECL void archive_entry_set_devminor(struct archive_entry *, __LA_DEV_T);
 __LA_DECL void archive_entry_set_filetype(struct archive_entry *, unsigned int);
 __LA_DECL void archive_entry_set_fflags(struct archive_entry *,
            unsigned long /* set */, unsigned long /* clear */);
@@ -344,15 +374,15 @@ __LA_DECL void    archive_entry_set_hardlin
 __LA_DECL void archive_entry_copy_hardlink(struct archive_entry *, const char *);
 __LA_DECL void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *);
 __LA_DECL int  archive_entry_update_hardlink_utf8(struct archive_entry *, const char *);
-__LA_DECL void archive_entry_set_ino(struct archive_entry *, la_int64_t);
-__LA_DECL void archive_entry_set_ino64(struct archive_entry *, la_int64_t);
+__LA_DECL void archive_entry_set_ino(struct archive_entry *, __LA_INO_T);
+__LA_DECL void archive_entry_set_ino64(struct archive_entry *, __LA_INO_T);
 __LA_DECL void archive_entry_set_link(struct archive_entry *, const char *);
 __LA_DECL void archive_entry_set_link_utf8(struct archive_entry *, const char *);
 __LA_DECL void archive_entry_copy_link(struct archive_entry *, const char *);
 __LA_DECL void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *);
 __LA_DECL int  archive_entry_update_link_utf8(struct archive_entry *, const char *);
 __LA_DECL void archive_entry_set_mode(struct archive_entry *, __LA_MODE_T);
-__LA_DECL void archive_entry_set_mtime(struct archive_entry *, time_t, long);
+__LA_DECL void archive_entry_set_mtime(struct archive_entry *, __LA_TIME_T, long);
 __LA_DECL void  archive_entry_unset_mtime(struct archive_entry *);
 __LA_DECL void archive_entry_set_nlink(struct archive_entry *, unsigned int);
 __LA_DECL void archive_entry_set_pathname(struct archive_entry *, const char *);
@@ -361,9 +391,9 @@ __LA_DECL void      archive_entry_copy_pathna
 __LA_DECL void archive_entry_copy_pathname_w(struct archive_entry *, const wchar_t *);
 __LA_DECL int  archive_entry_update_pathname_utf8(struct archive_entry *, const char *);
 __LA_DECL void archive_entry_set_perm(struct archive_entry *, __LA_MODE_T);
-__LA_DECL void archive_entry_set_rdev(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, dev_t);
-__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, dev_t);
+__LA_DECL void archive_entry_set_rdev(struct archive_entry *, __LA_DEV_T);
+__LA_DECL void archive_entry_set_rdevmajor(struct archive_entry *, __LA_DEV_T);
+__LA_DECL void archive_entry_set_rdevminor(struct archive_entry *, __LA_DEV_T);
 __LA_DECL void archive_entry_set_size(struct archive_entry *, la_int64_t);
 __LA_DECL void archive_entry_unset_size(struct archive_entry *);
 __LA_DECL void archive_entry_copy_sourcepath(struct archive_entry *, const char *);
@@ -419,6 +449,7 @@ __LA_DECL void archive_entry_copy_mac_me
 #define ARCHIVE_ENTRY_DIGEST_SHA512           0x00000006
 
 __LA_DECL const unsigned char * archive_entry_digest(struct archive_entry *, int /* type */);
+__LA_DECL int archive_entry_set_digest(struct archive_entry *, int, const unsigned char *);
 
 /*
  * ACL routines.  This used to simply store and return text-format ACL
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c:1.16 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c:1.17
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c:1.16     Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_iso9660.c  Wed May 21 15:25:51 2025
@@ -2273,7 +2273,7 @@ parse_rockridge(struct archive_read *a, 
                                if (version == 1) {
                                        if (data_length >= 8)
                                                file->mode
-                                                   = toi(data, 4);
+                                                   = (__LA_MODE_T)toi(data, 4);
                                        if (data_length >= 16)
                                                file->nlinks
                                                    = toi(data + 8, 4);
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c:1.16 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c:1.17
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c:1.16 Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_tar.c      Wed May 21 15:25:51 2025
@@ -169,36 +169,36 @@ static int        gnu_add_sparse_entry(struct a
 
 static void    gnu_clear_sparse_list(struct tar *);
 static int     gnu_sparse_old_read(struct archive_read *, struct tar *,
-                   const struct archive_entry_header_gnutar *header, size_t *);
+                   const struct archive_entry_header_gnutar *header, int64_t *);
 static int     gnu_sparse_old_parse(struct archive_read *, struct tar *,
                    const struct gnu_sparse *sparse, int length);
 static int     gnu_sparse_01_parse(struct archive_read *, struct tar *,
                    const char *, size_t);
 static ssize_t gnu_sparse_10_read(struct archive_read *, struct tar *,
-                   size_t *);
+                   int64_t *);
 static int     header_Solaris_ACL(struct archive_read *,  struct tar *,
-                   struct archive_entry *, const void *, size_t *);
+                   struct archive_entry *, const void *, int64_t *);
 static int     header_common(struct archive_read *,  struct tar *,
                    struct archive_entry *, const void *);
 static int     header_old_tar(struct archive_read *, struct tar *,
                    struct archive_entry *, const void *);
 static int     header_pax_extension(struct archive_read *, struct tar *,
-                   struct archive_entry *, const void *, size_t *);
+                   struct archive_entry *, const void *, int64_t *);
 static int     header_pax_global(struct archive_read *, struct tar *,
-                   struct archive_entry *, const void *h, size_t *);
+                   struct archive_entry *, const void *h, int64_t *);
 static int     header_gnu_longlink(struct archive_read *, struct tar *,
-                   struct archive_entry *, const void *h, size_t *);
+                   struct archive_entry *, const void *h, int64_t *);
 static int     header_gnu_longname(struct archive_read *, struct tar *,
-                   struct archive_entry *, const void *h, size_t *);
+                   struct archive_entry *, const void *h, int64_t *);
 static int     is_mac_metadata_entry(struct archive_entry *entry);
 static int     read_mac_metadata_blob(struct archive_read *,
-                   struct archive_entry *, size_t *);
+                   struct archive_entry *, int64_t *);
 static int     header_volume(struct archive_read *, struct tar *,
-                   struct archive_entry *, const void *h, size_t *);
+                   struct archive_entry *, const void *h, int64_t *);
 static int     header_ustar(struct archive_read *, struct tar *,
                    struct archive_entry *, const void *h);
 static int     header_gnutar(struct archive_read *, struct tar *,
-                   struct archive_entry *, const void *h, size_t *);
+                   struct archive_entry *, const void *h, int64_t *);
 static int     archive_read_format_tar_bid(struct archive_read *, int);
 static int     archive_read_format_tar_options(struct archive_read *,
                    const char *, const char *);
@@ -211,7 +211,7 @@ static int  archive_read_format_tar_read_
 static int     checksum(struct archive_read *, const void *);
 static int     pax_attribute(struct archive_read *, struct tar *,
                    struct archive_entry *, const char *key, size_t key_length,
-                   size_t value_length, size_t *unconsumed);
+                   size_t value_length, int64_t *unconsumed);
 static int     pax_attribute_LIBARCHIVE_xattr(struct archive_entry *,
                    const char *, size_t, const char *, size_t);
 static int     pax_attribute_SCHILY_acl(struct archive_read *, struct tar *,
@@ -220,20 +220,20 @@ static int        pax_attribute_SUN_holesdata(s
                    struct archive_entry *, const char *, size_t);
 static void    pax_time(const char *, size_t, int64_t *sec, long *nanos);
 static ssize_t readline(struct archive_read *, struct tar *, const char **,
-                   ssize_t limit, size_t *);
+                   ssize_t limit, int64_t *);
 static int     read_body_to_string(struct archive_read *, struct tar *,
-                   struct archive_string *, const void *h, size_t *);
+                   struct archive_string *, const void *h, int64_t *);
 static int     read_bytes_to_string(struct archive_read *,
-                   struct archive_string *, size_t, size_t *);
+                   struct archive_string *, size_t, int64_t *);
 static int64_t tar_atol(const char *, size_t);
 static int64_t tar_atol10(const char *, size_t);
 static int64_t tar_atol256(const char *, size_t);
 static int64_t tar_atol8(const char *, size_t);
 static int     tar_read_header(struct archive_read *, struct tar *,
-                   struct archive_entry *, size_t *);
+                   struct archive_entry *, int64_t *);
 static int     tohex(int c);
 static char    *url_decode(const char *, size_t);
-static void    tar_flush_unconsumed(struct archive_read *, size_t *);
+static void    tar_flush_unconsumed(struct archive_read *, int64_t *);
 
 /* Sanity limits:  These numbers should be low enough to
  * prevent a maliciously-crafted archive from forcing us to
@@ -478,7 +478,7 @@ archive_read_format_tar_options(struct a
  * anything outstanding since we're going to do read_aheads
  */
 static void
-tar_flush_unconsumed(struct archive_read *a, size_t *unconsumed)
+tar_flush_unconsumed(struct archive_read *a, int64_t *unconsumed)
 {
        if (*unconsumed) {
 /*
@@ -526,7 +526,8 @@ archive_read_format_tar_read_header(stru
        const char *p;
        const wchar_t *wp;
        int r;
-       size_t l, unconsumed = 0;
+       size_t l;
+       int64_t unconsumed = 0;
 
        /* Assign default device/inode values. */
        archive_entry_set_dev(entry, 1 + default_dev); /* Don't use zero. */
@@ -706,7 +707,7 @@ archive_read_format_tar_skip(struct arch
  */
 static int
 tar_read_header(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, size_t *unconsumed)
+    struct archive_entry *entry, int64_t *unconsumed)
 {
        ssize_t bytes;
        int err = ARCHIVE_OK, err2;
@@ -815,6 +816,8 @@ tar_read_header(struct archive_read *a, 
                switch(header->typeflag[0]) {
                case 'A': /* Solaris tar ACL */
                        if (seen_headers & seen_A_header) {
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                                                 "Redundant 'A' header");
                                return (ARCHIVE_FATAL);
                        }
                        seen_headers |= seen_A_header;
@@ -824,6 +827,8 @@ tar_read_header(struct archive_read *a, 
                        break;
                case 'g': /* POSIX-standard 'g' header. */
                        if (seen_headers & seen_g_header) {
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                                                 "Redundant 'g' header");
                                return (ARCHIVE_FATAL);
                        }
                        seen_headers |= seen_g_header;
@@ -833,27 +838,41 @@ tar_read_header(struct archive_read *a, 
                        break;
                case 'K': /* Long link name (GNU tar, others) */
                        if (seen_headers & seen_K_header) {
-                               return (ARCHIVE_FATAL);
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                                                 "Damaged archive: Redundant 'K' headers may cause linknames to be incorrect");
+                               err = err_combine(err, ARCHIVE_WARN);
                        }
                        seen_headers |= seen_K_header;
+                       a->archive.archive_format = ARCHIVE_FORMAT_TAR_GNUTAR;
+                       a->archive.archive_format_name = "GNU tar format";
                        err2 = header_gnu_longlink(a, tar, entry, h, unconsumed);
                        break;
                case 'L': /* Long filename (GNU tar, others) */
                        if (seen_headers & seen_L_header) {
-                               return (ARCHIVE_FATAL);
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                                                 "Damaged archive: Redundant 'L' headers may cause filenames to be incorrect");
+                               err = err_combine(err, ARCHIVE_WARN);
                        }
                        seen_headers |= seen_L_header;
+                       a->archive.archive_format = ARCHIVE_FORMAT_TAR_GNUTAR;
+                       a->archive.archive_format_name = "GNU tar format";
                        err2 = header_gnu_longname(a, tar, entry, h, unconsumed);
                        break;
                case 'V': /* GNU volume header */
                        if (seen_headers & seen_V_header) {
-                               return (ARCHIVE_FATAL);
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                                                 "Redundant 'V' header");
+                               err = err_combine(err, ARCHIVE_WARN);
                        }
                        seen_headers |= seen_V_header;
+                       a->archive.archive_format = ARCHIVE_FORMAT_TAR_GNUTAR;
+                       a->archive.archive_format_name = "GNU tar format";
                        err2 = header_volume(a, tar, entry, h, unconsumed);
                        break;
                case 'X': /* Used by SUN tar; same as 'x'. */
                        if (seen_headers & seen_x_header) {
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                                                 "Redundant 'X'/'x' header");
                                return (ARCHIVE_FATAL);
                        }
                        seen_headers |= seen_x_header;
@@ -864,6 +883,8 @@ tar_read_header(struct archive_read *a, 
                        break;
                case 'x': /* POSIX-standard 'x' header. */
                        if (seen_headers & seen_x_header) {
+                               archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
+                                                 "Redundant 'x' header");
                                return (ARCHIVE_FATAL);
                        }
                        seen_headers |= seen_x_header;
@@ -1043,7 +1064,7 @@ archive_block_is_null(const char *p)
  */
 static int
 header_Solaris_ACL(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, const void *h, size_t *unconsumed)
+    struct archive_entry *entry, const void *h, int64_t *unconsumed)
 {
        const struct archive_entry_header_ustar *header;
        struct archive_string    acl_text;
@@ -1149,7 +1170,7 @@ header_Solaris_ACL(struct archive_read *
  */
 static int
 header_gnu_longlink(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, const void *h, size_t *unconsumed)
+    struct archive_entry *entry, const void *h, int64_t *unconsumed)
 {
        int err;
 
@@ -1183,7 +1204,7 @@ set_conversion_failed_error(struct archi
  */
 static int
 header_gnu_longname(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, const void *h, size_t *unconsumed)
+    struct archive_entry *entry, const void *h, int64_t *unconsumed)
 {
        int err;
        struct archive_string longname;
@@ -1204,7 +1225,7 @@ header_gnu_longname(struct archive_read 
  */
 static int
 header_volume(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, const void *h, size_t *unconsumed)
+    struct archive_entry *entry, const void *h, int64_t *unconsumed)
 {
        const struct archive_entry_header_ustar *header;
        int64_t size, to_consume;
@@ -1230,7 +1251,7 @@ header_volume(struct archive_read *a, st
 static int
 read_bytes_to_string(struct archive_read *a,
                     struct archive_string *as, size_t size,
-                    size_t *unconsumed) {
+                    int64_t *unconsumed) {
        const void *src;
 
        /* Fail if we can't make our buffer big enough. */
@@ -1263,7 +1284,7 @@ read_bytes_to_string(struct archive_read
  */
 static int
 read_body_to_string(struct archive_read *a, struct tar *tar,
-    struct archive_string *as, const void *h, size_t *unconsumed)
+    struct archive_string *as, const void *h, int64_t *unconsumed)
 {
        int64_t size;
        const struct archive_entry_header_ustar *header;
@@ -1654,7 +1675,7 @@ is_mac_metadata_entry(struct archive_ent
  */
 static int
 read_mac_metadata_blob(struct archive_read *a,
-    struct archive_entry *entry, size_t *unconsumed)
+    struct archive_entry *entry, int64_t *unconsumed)
 {
        int64_t size;
        size_t msize;
@@ -1711,7 +1732,7 @@ read_mac_metadata_blob(struct archive_re
  */
 static int
 header_pax_global(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, const void *h, size_t *unconsumed)
+    struct archive_entry *entry, const void *h, int64_t *unconsumed)
 {
        const struct archive_entry_header_ustar *header;
        int64_t size, to_consume;
@@ -1818,7 +1839,7 @@ header_ustar(struct archive_read *a, str
 
 static int
 header_pax_extension(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, const void *h, size_t *unconsumed)
+    struct archive_entry *entry, const void *h, int64_t *unconsumed)
 {
        /* Sanity checks: The largest `x` body I've ever heard of was
         * a little over 4MB.  So I doubt there has ever been a
@@ -2211,7 +2232,7 @@ pax_attribute_SCHILY_acl(struct archive_
 }
 
 static int
-pax_attribute_read_time(struct archive_read *a, size_t value_length, int64_t *ps, long *pn, size_t *unconsumed) {
+pax_attribute_read_time(struct archive_read *a, size_t value_length, int64_t *ps, long *pn, int64_t *unconsumed) {
        struct archive_string as;
        int r;
 
@@ -2240,7 +2261,7 @@ pax_attribute_read_time(struct archive_r
 static int
 pax_attribute_read_number(struct archive_read *a, size_t value_length, int64_t *result) {
        struct archive_string as;
-       size_t unconsumed = 0;
+       int64_t unconsumed = 0;
        int r;
 
        if (value_length > 64) {
@@ -2254,6 +2275,7 @@ pax_attribute_read_number(struct archive
        tar_flush_unconsumed(a, &unconsumed);
        if (r < ARCHIVE_OK) {
                archive_string_free(&as);
+               *result = 0;
                return (r);
        }
 
@@ -2280,7 +2302,7 @@ pax_attribute_read_number(struct archive
  */
 static int
 pax_attribute(struct archive_read *a, struct tar *tar, struct archive_entry *entry,
-             const char *key, size_t key_length, size_t value_length, size_t *unconsumed)
+             const char *key, size_t key_length, size_t value_length, int64_t *unconsumed)
 {
        int64_t t;
        long n;
@@ -2877,7 +2899,7 @@ pax_time(const char *p, size_t length, i
  */
 static int
 header_gnutar(struct archive_read *a, struct tar *tar,
-    struct archive_entry *entry, const void *h, size_t *unconsumed)
+    struct archive_entry *entry, const void *h, int64_t *unconsumed)
 {
        const struct archive_entry_header_gnutar *header;
        int64_t t;
@@ -3028,7 +3050,7 @@ gnu_clear_sparse_list(struct tar *tar)
 
 static int
 gnu_sparse_old_read(struct archive_read *a, struct tar *tar,
-    const struct archive_entry_header_gnutar *header, size_t *unconsumed)
+    const struct archive_entry_header_gnutar *header, int64_t *unconsumed)
 {
        ssize_t bytes_read;
        const void *data;
@@ -3162,7 +3184,7 @@ gnu_sparse_01_parse(struct archive_read 
  */
 static int64_t
 gnu_sparse_10_atol(struct archive_read *a, struct tar *tar,
-    int64_t *remaining, size_t *unconsumed)
+    int64_t *remaining, int64_t *unconsumed)
 {
        int64_t l, limit, last_digit_limit;
        const char *p;
@@ -3208,7 +3230,7 @@ gnu_sparse_10_atol(struct archive_read *
  * that was read.
  */
 static ssize_t
-gnu_sparse_10_read(struct archive_read *a, struct tar *tar, size_t *unconsumed)
+gnu_sparse_10_read(struct archive_read *a, struct tar *tar, int64_t *unconsumed)
 {
        ssize_t bytes_read;
        int entries;
@@ -3455,7 +3477,7 @@ tar_atol256(const char *_p, size_t char_
  */
 static ssize_t
 readline(struct archive_read *a, struct tar *tar, const char **start,
-    ssize_t limit, size_t *unconsumed)
+    ssize_t limit, int64_t *unconsumed)
 {
        ssize_t bytes_read;
        ssize_t total_size = 0;

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c:1.9 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c:1.10
--- pkgsrc/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c:1.9      Sun Sep 15 07:02:20 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_entry_link_resolver.c  Wed May 21 15:25:50 2025
@@ -280,6 +280,10 @@ find_entry(struct archive_entry_linkreso
        dev_t                    dev;
        int64_t                  ino;
 
+       if (!archive_entry_ino_is_set(entry) || !archive_entry_dev_is_set(entry)) {
+               return (NULL);
+       }
+
        /* Free a held entry. */
        if (res->spare != NULL) {
                archive_entry_free(res->spare->canonical);
@@ -369,6 +373,10 @@ insert_entry(struct archive_entry_linkre
        struct links_entry *le;
        size_t hash, bucket;
 
+       if (!archive_entry_ino_is_set(entry) || !archive_entry_dev_is_set(entry)) {
+               return (NULL);
+       }
+
        /* Add this entry to the links cache. */
        le = calloc(1, sizeof(struct links_entry));
        if (le == NULL)
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c:1.9 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c:1.10
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c:1.9 Tue Apr 30 06:05:19 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_warc.c     Wed May 21 15:25:51 2025
@@ -386,7 +386,8 @@ start_over:
        case LAST_WT:
        default:
                /* consume the content and start over */
-               _warc_skip(a);
+               if (_warc_skip(a) < 0)
+                       return (ARCHIVE_FATAL);
                goto start_over;
        }
        return (ARCHIVE_OK);
@@ -439,7 +440,9 @@ _warc_skip(struct archive_read *a)
 {
        struct warc_s *w = a->format->data;
 
-       __archive_read_consume(a, w->cntlen + 4U/*\r\n\r\n separator*/);
+       if (__archive_read_consume(a, w->cntlen) < 0 ||
+           __archive_read_consume(a, 4U/*\r\n\r\n separator*/) < 0)
+               return (ARCHIVE_FATAL);
        w->cntlen = 0U;
        w->cntoff = 0U;
        return (ARCHIVE_OK);
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c:1.9 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c:1.10
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c:1.9    Sat Oct 19 05:39:59 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_7zip.c        Wed May 21 15:25:51 2025
@@ -28,7 +28,12 @@
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
+#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #ifdef HAVE_BZLIB_H
 #include <bzlib.h>
 #endif
@@ -38,6 +43,9 @@
 #ifdef HAVE_ZLIB_H
 #include <zlib.h>
 #endif
+#ifdef HAVE_ZSTD_H
+#include <zstd.h>
+#endif
 
 #include "archive.h"
 #ifndef HAVE_ZLIB_H
@@ -50,6 +58,7 @@
 #include "archive_private.h"
 #include "archive_rb.h"
 #include "archive_string.h"
+#include "archive_time_private.h"
 #include "archive_write_private.h"
 #include "archive_write_set_format_private.h"
 
@@ -63,6 +72,8 @@
 #define _7Z_BZIP2      0x040202
 #define _7Z_PPMD       0x030401
 
+#define _7Z_ZSTD       0x4F71101 /* Copied from https://github.com/mcmilk/7-Zip-zstd.git */
+
 /*
  * 7-Zip header property IDs.
  */
@@ -110,6 +121,9 @@
 // the attr field along with the unix permissions.
 #define FILE_ATTRIBUTE_UNIX_EXTENSION 0x8000
 
+// Many systems define min or MIN, but not all.
+#define sevenzipmin(a,b) ((a) < (b) ? (a) : (b))
+
 enum la_zaction {
        ARCHIVE_Z_FINISH,
        ARCHIVE_Z_RUN
@@ -209,7 +223,11 @@ struct _7zip {
 #define        ENCODED_CRC32   2
 
        unsigned                 opt_compression;
+
        int                      opt_compression_level;
+       int                      opt_zstd_compression_level; // This requires a different default value.
+
+       int                      opt_threads;
 
        struct la_zstream        stream;
        struct coder             coder;
@@ -285,12 +303,19 @@ static int        compression_code_lzma(struct 
 static int     compression_end_lzma(struct archive *, struct la_zstream *);
 #endif
 static int     compression_init_encoder_ppmd(struct archive *,
-                   struct la_zstream *, unsigned, uint32_t);
+                   struct la_zstream *, uint8_t, uint32_t);
 static int     compression_code_ppmd(struct archive *,
                    struct la_zstream *, enum la_zaction);
 static int     compression_end_ppmd(struct archive *, struct la_zstream *);
 static int     _7z_compression_init_encoder(struct archive_write *, unsigned,
                    int);
+static int     compression_init_encoder_zstd(struct archive *,
+                   struct la_zstream *, int, int);
+#if defined(HAVE_ZSTD_H)
+static int     compression_code_zstd(struct archive *,
+                   struct la_zstream *, enum la_zaction);
+static int     compression_end_zstd(struct archive *, struct la_zstream *);
+#endif
 static int     compression_code(struct archive *,
                    struct la_zstream *, enum la_zaction);
 static int     compression_end(struct archive *,
@@ -301,6 +326,21 @@ static int make_header(struct archive_wr
 static int     make_streamsInfo(struct archive_write *, uint64_t, uint64_t,
                        uint64_t, int, struct coder *, int, uint32_t);
 
+static int
+string_to_number(const char *string, intmax_t *numberp)
+{
+       char *end;
+
+       if (string == NULL || *string == '\0')
+               return (ARCHIVE_WARN);
+       *numberp = strtoimax(string, &end, 10);
+       if (end == string || *end != '\0' || errno == EOVERFLOW) {
+               *numberp = 0;
+               return (ARCHIVE_WARN);
+       }
+       return (ARCHIVE_OK);
+}
+
 int
 archive_write_set_format_7zip(struct archive *_a)
 {
@@ -335,11 +375,24 @@ archive_write_set_format_7zip(struct arc
        zip->opt_compression = _7Z_BZIP2;
 #elif defined(HAVE_ZLIB_H)
        zip->opt_compression = _7Z_DEFLATE;
+#elif HAVE_ZSTD_H
+       zip->opt_compression = _7Z_ZSTD;
 #else
        zip->opt_compression = _7Z_COPY;
 #endif
+
        zip->opt_compression_level = 6;
 
+#ifdef ZSTD_CLEVEL_DEFAULT
+       // Zstandard compression needs a different default
+       // value than other encoders.
+       zip->opt_zstd_compression_level = ZSTD_CLEVEL_DEFAULT;
+#else
+       zip->opt_zstd_compression_level = 3;
+#endif
+
+       zip->opt_threads = 1;
+
        a->format_data = zip;
 
        a->format_name = "7zip";
@@ -398,6 +451,13 @@ _7z_options(struct archive_write *a, con
 #else
                        name = "lzma2";
 #endif
+               else if (strcmp(value, "zstd") == 0 ||
+                   strcmp(value, "ZSTD") == 0)
+#if HAVE_ZSTD_H
+                       zip->opt_compression = _7Z_ZSTD;
+#else
+                       name = "zstd";
+#endif
                else if (strcmp(value, "ppmd") == 0 ||
                    strcmp(value, "PPMD") == 0 ||
                    strcmp(value, "PPMd") == 0)
@@ -420,16 +480,68 @@ _7z_options(struct archive_write *a, con
                return (ARCHIVE_OK);
        }
        if (strcmp(key, "compression-level") == 0) {
-               if (value == NULL ||
-                   !(value[0] >= '0' && value[0] <= '9') ||
-                   value[1] != '\0') {
-                       archive_set_error(&(a->archive),
-                           ARCHIVE_ERRNO_MISC,
-                           "Illegal value `%s'",
-                           value);
+               if (value == NULL || *value == '\0') {
+                       archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                               "Invalid compression-level option value `%s'", value);
+                       return (ARCHIVE_FAILED);
+               }
+
+               char *end = NULL;
+               long lvl = strtol(value, &end, 10);
+               if (end == NULL || *end != '\0') {
+                       archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                               "parsing compression-level option value failed `%s'", value);
+                       return (ARCHIVE_FAILED);
+               }
+
+#if HAVE_ZSTD_H && HAVE_ZSTD_compressStream && HAVE_ZSTD_minCLevel
+               int min_level = sevenzipmin(0, ZSTD_minCLevel());
+#else
+               const int min_level = 0;
+#endif
+
+#if HAVE_ZSTD_H && HAVE_ZSTD_compressStream
+               int max_level = ZSTD_maxCLevel();
+#else
+               const int max_level = 9;
+#endif
+
+               if (lvl < min_level || lvl > max_level) {
+                       archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                               "compression-level option value `%ld' out of range", lvl);
                        return (ARCHIVE_FAILED);
                }
-               zip->opt_compression_level = value[0] - '0';
+
+               // Note: we don't know here if this value is for zstd (negative to ~22),
+               // or zlib-style 0-9. If zstd is enabled but not in use, we will need to
+               // validate opt_compression_level before use.
+               zip->opt_compression_level = (int)lvl;
+
+               zip->opt_zstd_compression_level = (int)lvl;
+               return (ARCHIVE_OK);
+       }
+       if (strcmp(key, "threads") == 0) {
+               intmax_t threads;
+               if (string_to_number(value, &threads) != ARCHIVE_OK) {
+                       return (ARCHIVE_WARN);
+               }
+               if (threads < 0) {
+                       return (ARCHIVE_WARN);
+               }
+               if (threads == 0) {
+#if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_ONLN)
+                       threads = sysconf(_SC_NPROCESSORS_ONLN);
+#elif !defined(__CYGWIN__) && defined(_WIN32_WINNT) && \
+       _WIN32_WINNT >= 0x0601 /* _WIN32_WINNT_WIN7 */
+                       DWORD winCores = GetActiveProcessorCount(
+                               ALL_PROCESSOR_GROUPS);
+                       threads = (intmax_t)winCores;
+#else
+                       threads = 1;
+#endif
+               }
+
+               zip->opt_threads = (int)threads;
                return (ARCHIVE_OK);
        }
 
@@ -495,8 +607,20 @@ _7z_write_header(struct archive_write *a
         * Init compression.
         */
        if ((zip->total_number_entry - zip->total_number_empty_entry) == 1) {
-               r = _7z_compression_init_encoder(a, zip->opt_compression,
-                       zip->opt_compression_level);
+
+               int level = zip->opt_compression_level;
+#if HAVE_ZSTD_H
+               if (zip->opt_compression == _7Z_ZSTD) {
+                       level = zip->opt_zstd_compression_level;
+               } else if (level < 0 || level > 9) {
+                       archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                               "compression-level option value `%d' out of range 0-9", level);
+                       file_free(file);
+                       return (ARCHIVE_FATAL);
+               }
+#endif
+
+               r = _7z_compression_init_encoder(a, zip->opt_compression, level);
                if (r < 0) {
                        file_free(file);
                        return (ARCHIVE_FATAL);
@@ -785,8 +909,12 @@ _7z_close(struct archive_write *a)
 #else
                header_compression = _7Z_COPY;
 #endif
-               r = _7z_compression_init_encoder(a, header_compression,
-                                                zip->opt_compression_level);
+
+               int level = zip->opt_compression_level;
+               if (level < 0) level = 0;
+               else if (level > 9) level = 9;
+
+               r = _7z_compression_init_encoder(a, header_compression, level);
                if (r < 0)
                        return (r);
                zip->crc32flg = PRECODE_CRC32;
@@ -844,7 +972,7 @@ _7z_close(struct archive_write *a)
                header_offset = header_size = 0;
                header_crc32 = 0;
        }
-       
+
        length = zip->temp_offset;
 
        /*
@@ -1164,20 +1292,6 @@ make_streamsInfo(struct archive_write *a
        return (ARCHIVE_OK);
 }
 
-
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
-static uint64_t
-utcToFiletime(time_t t, long ns)
-{
-       uint64_t fileTime;
-
-       fileTime = t;
-       fileTime *= 10000000;
-       fileTime += ns / 100;
-       fileTime += EPOC_TIME;
-       return (fileTime);
-}
-
 static int
 make_time(struct archive_write *a, uint8_t type, unsigned flg, int ti)
 {
@@ -1249,7 +1363,6 @@ make_time(struct archive_write *a, uint8
        if (r < 0)
                return (r);
 
-
        /*
         * Make Times.
         */
@@ -1257,7 +1370,7 @@ make_time(struct archive_write *a, uint8
        for (;file != NULL; file = file->next) {
                if ((file->flg & flg) == 0)
                        continue;
-               archive_le64enc(filetime, utcToFiletime(file->times[ti].time,
+               archive_le64enc(filetime, unix_to_ntfs(file->times[ti].time,
                        file->times[ti].time_ns));
                r = (int)compress_out(a, filetime, 8, ARCHIVE_Z_RUN);
                if (r < 0)
@@ -1504,7 +1617,7 @@ file_cmp_node(const struct archive_rb_no
                return (memcmp(f1->utf16name, f2->utf16name, f1->name_len));
        return (f1->name_len > f2->name_len)?1:-1;
 }
-        
+
 static int
 file_cmp_key(const struct archive_rb_node *n, const void *key)
 {
@@ -1646,7 +1759,8 @@ file_init_register_empty(struct _7zip *z
 }
 
 #if !defined(HAVE_ZLIB_H) || !defined(HAVE_BZLIB_H) ||\
-        !defined(BZ_CONFIG_ERROR) || !defined(HAVE_LZMA_H)
+        !defined(BZ_CONFIG_ERROR) || !defined(HAVE_LZMA_H) ||\
+        !(HAVE_ZSTD_H && HAVE_ZSTD_compressStream)
 static int
 compression_unsupported_encoder(struct archive *a,
     struct la_zstream *lastrm, const char *name)
@@ -2159,7 +2273,7 @@ ppmd_write(void *p, Byte b)
 
 static int
 compression_init_encoder_ppmd(struct archive *a,
-    struct la_zstream *lastrm, unsigned maxOrder, uint32_t msize)
+    struct la_zstream *lastrm, uint8_t maxOrder, uint32_t msize)
 {
        struct ppmd_stream *strm;
        uint8_t *props;
@@ -2279,6 +2393,117 @@ compression_end_ppmd(struct archive *a, 
        return (ARCHIVE_OK);
 }
 
+#if HAVE_ZSTD_H && HAVE_ZSTD_compressStream
+static int
+compression_init_encoder_zstd(struct archive *a, struct la_zstream *lastrm, int level, int threads)
+{
+       if (lastrm->valid)
+               compression_end(a, lastrm);
+
+       ZSTD_CStream *strm = ZSTD_createCStream();
+       if (strm == NULL) {
+               archive_set_error(a, ENOMEM,
+                       "Can't allocate memory for zstd stream");
+               return (ARCHIVE_FATAL);
+       }
+
+       if (ZSTD_isError(ZSTD_initCStream(strm, level))) {
+               ZSTD_freeCStream(strm);
+               archive_set_error(a, ARCHIVE_ERRNO_MISC,
+                       "Internal error initializing zstd compressor object");
+               return (ARCHIVE_FATAL);
+       }
+
+       ZSTD_CCtx_setParameter(strm, ZSTD_c_nbWorkers, threads);
+
+       // p7zip-zstd fails to unpack archives that don't have prop_size 5.
+       // 7-Zip-zstd fails to unpack archives that don't have prop_size 3 or 5.
+       // So let's use 5...
+       lastrm->prop_size = 5;
+       lastrm->props = calloc(5, 1);
+       if (lastrm->props == NULL) {
+               ZSTD_freeCStream(strm);
+               archive_set_error(a, ARCHIVE_ERRNO_MISC,
+                       "Internal error initializing zstd compressor properties");
+               return (ARCHIVE_FATAL);
+       }
+
+       // Refer to the DProps struct in 7-Zip-zstd's ZstdDecoder.h:
+       // https://github.com/mcmilk/7-Zip-zstd/blob/79b2c78e9e7735ddf90147129b75cf2797ff6522/CPP/7zip/Compress/ZstdDecoder.h#L34S
+       lastrm->props[0] = ZSTD_VERSION_MAJOR;
+       lastrm->props[1] = ZSTD_VERSION_MINOR;
+       lastrm->props[2] = level;
+       // lastrm->props[3] and lastrm->props[4] are reserved. Leave them as 0.
+
+       lastrm->real_stream = strm;
+       lastrm->valid = 1;
+       lastrm->code = compression_code_zstd;
+       lastrm->end = compression_end_zstd;
+
+       return (ARCHIVE_OK);
+}
+
+static int
+compression_code_zstd(struct archive *a,
+    struct la_zstream *lastrm, enum la_zaction action)
+{
+       ZSTD_CStream *strm = (ZSTD_CStream *)lastrm->real_stream;
+
+       ZSTD_outBuffer out = { .dst = lastrm->next_out, .size = lastrm->avail_out, .pos = 0 };
+       ZSTD_inBuffer  in  = { .src = lastrm->next_in,  .size = lastrm->avail_in,  .pos = 0 };
+
+       size_t zret;
+
+       ZSTD_EndDirective mode = (action == ARCHIVE_Z_RUN) ? ZSTD_e_continue : ZSTD_e_end;
+
+       zret = ZSTD_compressStream2(strm, &out, &in, mode);
+       if (ZSTD_isError(zret)) {
+               archive_set_error(a, ARCHIVE_ERRNO_MISC,
+                       "zstd compression failed, ZSTD_compressStream2 returned: %s",
+                       ZSTD_getErrorName(zret));
+               return (ARCHIVE_FATAL);
+       }
+
+       lastrm->next_in += in.pos;
+       lastrm->avail_in -= in.pos;
+       lastrm->total_in += in.pos;
+
+       lastrm->next_out += out.pos;
+       lastrm->avail_out -= out.pos;
+       lastrm->total_out += out.pos;
+
+       if (action == ARCHIVE_Z_FINISH && zret == 0)
+               return (ARCHIVE_EOF); // All done.
+
+       return (ARCHIVE_OK); // More work to do.
+}
+
+static int
+compression_end_zstd(struct archive *a, struct la_zstream *lastrm)
+{
+       ZSTD_CStream *strm;
+
+       (void)a; /* UNUSED */
+       strm = (ZSTD_CStream *)lastrm->real_stream;
+       ZSTD_freeCStream(strm);
+       lastrm->valid = 0;
+       lastrm->real_stream = NULL;
+       return (ARCHIVE_OK);
+}
+
+#else
+
+static int
+compression_init_encoder_zstd(struct archive *a, struct la_zstream *lastrm, int level, int threads)
+{
+       (void) level; /* UNUSED */
+       (void) threads; /* UNUSED */
+       if (lastrm->valid)
+               compression_end(a, lastrm);
+       return (compression_unsupported_encoder(a, lastrm, "zstd"));
+}
+#endif
+
 /*
  * Universal compressor initializer.
  */
@@ -2316,6 +2541,11 @@ _7z_compression_init_encoder(struct arch
                    &(a->archive), &(zip->stream),
                    PPMD7_DEFAULT_ORDER, PPMD7_DEFAULT_MEM_SIZE);
                break;
+       case _7Z_ZSTD:
+               r = compression_init_encoder_zstd(
+                   &(a->archive), &(zip->stream),
+                   compression_level, zip->opt_threads);
+               break;
        case _7Z_COPY:
        default:
                r = compression_init_encoder_copy(
@@ -2352,5 +2582,3 @@ compression_end(struct archive *a, struc
        }
        return (ARCHIVE_OK);
 }
-
-
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c:1.9 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c:1.10
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c:1.9  Sat Oct 19 05:39:59 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_gnutar.c      Wed May 21 15:25:51 2025
@@ -153,7 +153,7 @@ static const char template_header[] = {
 static int      archive_write_gnutar_options(struct archive_write *,
                    const char *, const char *);
 static int     archive_format_gnutar_header(struct archive_write *, char h[512],
-                   struct archive_entry *, int tartype);
+                   struct archive_entry *, char tartype);
 static int      archive_write_gnutar_header(struct archive_write *,
                    struct archive_entry *entry);
 static ssize_t archive_write_gnutar_data(struct archive_write *a, const void *buff,
@@ -274,7 +274,7 @@ archive_write_gnutar_header(struct archi
 {
        char buff[512];
        int r, ret, ret2 = ARCHIVE_OK;
-       int tartype;
+       char tartype;
        struct gnutar *gnutar;
        struct archive_string_conv *sconv;
        struct archive_entry *entry_main;
@@ -504,7 +504,7 @@ archive_write_gnutar_header(struct archi
                archive_entry_set_uname(temp, "root");
                archive_entry_set_gname(temp, "wheel");
 
-               archive_entry_set_pathname(temp, "././@LongLink");
+               archive_entry_set_pathname(temp, "././@LongName");
                archive_entry_set_size(temp, length);
                ret = archive_format_gnutar_header(a, buff, temp, 'L');
                archive_entry_free(temp);
@@ -562,7 +562,7 @@ exit_write_header:
 
 static int
 archive_format_gnutar_header(struct archive_write *a, char h[512],
-    struct archive_entry *entry, int tartype)
+    struct archive_entry *entry, char tartype)
 {
        unsigned int checksum;
        int i, ret;
@@ -640,7 +640,7 @@ archive_format_gnutar_header(struct arch
        if (format_number(archive_entry_uid(entry), h + GNUTAR_uid_offset,
                GNUTAR_uid_size, GNUTAR_uid_max_size)) {
                archive_set_error(&a->archive, ERANGE,
-                   "Numeric user ID %jd too large",
+                   "Numeric user ID %jd too large for gnutar format",
                    (intmax_t)archive_entry_uid(entry));
                ret = ARCHIVE_FAILED;
        }
@@ -649,7 +649,7 @@ archive_format_gnutar_header(struct arch
        if (format_number(archive_entry_gid(entry), h + GNUTAR_gid_offset,
                GNUTAR_gid_size, GNUTAR_gid_max_size)) {
                archive_set_error(&a->archive, ERANGE,
-                   "Numeric group ID %jd too large",
+                   "Numeric group ID %jd too large for gnutar format",
                    (intmax_t)archive_entry_gid(entry));
                ret = ARCHIVE_FAILED;
        }
@@ -672,7 +672,7 @@ archive_format_gnutar_header(struct arch
                    h + GNUTAR_rdevmajor_offset,
                        GNUTAR_rdevmajor_size)) {
                        archive_set_error(&a->archive, ERANGE,
-                           "Major device number too large");
+                           "Major device number too large for gnutar format");
                        ret = ARCHIVE_FAILED;
                }
 
@@ -680,7 +680,7 @@ archive_format_gnutar_header(struct arch
                    h + GNUTAR_rdevminor_offset,
                        GNUTAR_rdevminor_size)) {
                        archive_set_error(&a->archive, ERANGE,
-                           "Minor device number too large");
+                           "Minor device number too large for gnutar format");
                        ret = ARCHIVE_FAILED;
                }
        }
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c:1.9 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c:1.10
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c:1.9   Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_mtree.c       Wed May 21 15:25:51 2025
@@ -82,6 +82,7 @@ struct dir_info {
 struct reg_info {
        int compute_sum;
        uint32_t crc;
+       uint_least32_t mset_digest;
        struct ae_digest digest;
 };
 
@@ -862,6 +863,50 @@ mtree_entry_free(struct mtree_entry *me)
        free(me);
 }
 
+static void
+mtree_copy_ae_digests(struct reg_info *reg, struct archive_entry *entry, int compute_sum)
+{
+       reg->compute_sum = compute_sum;
+       reg->mset_digest = entry->mset_digest;
+
+       if ((reg->compute_sum & F_MD5)
+               && (reg->mset_digest & AE_MSET_DIGEST_MD5)) {
+
+               memcpy(&reg->digest.md5, entry->digest.md5,
+                       sizeof(reg->digest.md5));
+       }
+       if ((reg->compute_sum & F_RMD160)
+               && (reg->mset_digest & AE_MSET_DIGEST_RMD160)) {
+
+               memcpy(&reg->digest.rmd160, entry->digest.rmd160,
+                       sizeof(reg->digest.rmd160));
+       }
+       if ((reg->compute_sum & F_SHA1)
+               && (reg->mset_digest & AE_MSET_DIGEST_SHA1)) {
+
+               memcpy(&reg->digest.sha1, entry->digest.sha1,
+                       sizeof(reg->digest.sha1));
+       }
+       if ((reg->compute_sum & F_SHA256)
+               && (reg->mset_digest & AE_MSET_DIGEST_SHA256)) {
+
+               memcpy(&reg->digest.sha256, entry->digest.sha256,
+                       sizeof(reg->digest.sha256));
+       }
+       if ((reg->compute_sum & F_SHA384)
+               && (reg->mset_digest & AE_MSET_DIGEST_SHA384)) {
+
+               memcpy(&reg->digest.sha384, entry->digest.sha384,
+                       sizeof(reg->digest.sha384));
+       }
+       if ((reg->compute_sum & F_SHA512)
+               && (reg->mset_digest & AE_MSET_DIGEST_SHA512)) {
+
+               memcpy(&reg->digest.sha512, entry->digest.sha512,
+                       sizeof(reg->digest.sha512));
+       }
+}
+
 static int
 archive_write_mtree_header(struct archive_write *a,
     struct archive_entry *entry)
@@ -896,8 +941,12 @@ archive_write_mtree_header(struct archiv
        /* If the current file is a regular file, we have to
         * compute the sum of its content.
         * Initialize a bunch of checksum context. */
-       if (mtree_entry->reg_info)
+       if (mtree_entry->reg_info) {
                sum_init(mtree);
+               /* honor archive_entry_set_digest() calls. These values will be
+                * overwritten if archive_write_mtree_data() is called */
+               mtree_copy_ae_digests(mtree_entry->reg_info, entry, mtree->compute_sum);
+       }
 
        return (r2);
 }
@@ -1516,28 +1565,46 @@ sum_update(struct mtree_writer *mtree, c
                mtree->crc_len += n;
        }
 #ifdef ARCHIVE_HAS_MD5
-       if (mtree->compute_sum & F_MD5)
+       if (mtree->compute_sum & F_MD5) {
                archive_md5_update(&mtree->md5ctx, buff, n);
+               mtree->mtree_entry->reg_info->mset_digest &=
+                       ~AE_MSET_DIGEST_MD5;
+       }
 #endif
 #ifdef ARCHIVE_HAS_RMD160
-       if (mtree->compute_sum & F_RMD160)
+       if (mtree->compute_sum & F_RMD160) {
                archive_rmd160_update(&mtree->rmd160ctx, buff, n);
+               mtree->mtree_entry->reg_info->mset_digest &=
+                       ~AE_MSET_DIGEST_RMD160;
+       }
 #endif
 #ifdef ARCHIVE_HAS_SHA1
-       if (mtree->compute_sum & F_SHA1)
+       if (mtree->compute_sum & F_SHA1) {
                archive_sha1_update(&mtree->sha1ctx, buff, n);
+               mtree->mtree_entry->reg_info->mset_digest &=
+                       ~AE_MSET_DIGEST_SHA1;
+       }
 #endif
 #ifdef ARCHIVE_HAS_SHA256
-       if (mtree->compute_sum & F_SHA256)
+       if (mtree->compute_sum & F_SHA256) {
                archive_sha256_update(&mtree->sha256ctx, buff, n);
+               mtree->mtree_entry->reg_info->mset_digest &=
+                       ~AE_MSET_DIGEST_SHA256;
+       }
 #endif
 #ifdef ARCHIVE_HAS_SHA384
-       if (mtree->compute_sum & F_SHA384)
+       if (mtree->compute_sum & F_SHA384) {
                archive_sha384_update(&mtree->sha384ctx, buff, n);
+               mtree->mtree_entry->reg_info->mset_digest &=
+                       ~AE_MSET_DIGEST_SHA384;
+       }
 #endif
 #ifdef ARCHIVE_HAS_SHA512
-       if (mtree->compute_sum & F_SHA512)
+       if (mtree->compute_sum & F_SHA512) {
                archive_sha512_update(&mtree->sha512ctx, buff, n);
+               mtree->mtree_entry->reg_info->mset_digest &=
+                       ~AE_MSET_DIGEST_SHA512;
+       }
 #endif
 }
 
@@ -1553,27 +1620,39 @@ sum_final(struct mtree_writer *mtree, st
                reg->crc = ~mtree->crc;
        }
 #ifdef ARCHIVE_HAS_MD5
-       if (mtree->compute_sum & F_MD5)
+       if ((mtree->compute_sum & F_MD5)
+               && !(reg->mset_digest & AE_MSET_DIGEST_MD5))
+
                archive_md5_final(&mtree->md5ctx, reg->digest.md5);
 #endif
 #ifdef ARCHIVE_HAS_RMD160
-       if (mtree->compute_sum & F_RMD160)
+       if ((mtree->compute_sum & F_RMD160)
+               && !(reg->mset_digest & AE_MSET_DIGEST_RMD160))
+
                archive_rmd160_final(&mtree->rmd160ctx, reg->digest.rmd160);
 #endif
 #ifdef ARCHIVE_HAS_SHA1
-       if (mtree->compute_sum & F_SHA1)
+       if ((mtree->compute_sum & F_SHA1)
+               && !(reg->mset_digest & AE_MSET_DIGEST_SHA1))
+
                archive_sha1_final(&mtree->sha1ctx, reg->digest.sha1);
 #endif
 #ifdef ARCHIVE_HAS_SHA256
-       if (mtree->compute_sum & F_SHA256)
+       if ((mtree->compute_sum & F_SHA256)
+               && !(reg->mset_digest & AE_MSET_DIGEST_SHA256))
+
                archive_sha256_final(&mtree->sha256ctx, reg->digest.sha256);
 #endif
 #ifdef ARCHIVE_HAS_SHA384
-       if (mtree->compute_sum & F_SHA384)
+       if ((mtree->compute_sum & F_SHA384)
+               && !(reg->mset_digest & AE_MSET_DIGEST_SHA384))
+
                archive_sha384_final(&mtree->sha384ctx, reg->digest.sha384);
 #endif
 #ifdef ARCHIVE_HAS_SHA512
-       if (mtree->compute_sum & F_SHA512)
+       if ((mtree->compute_sum & F_SHA512)
+               && !(reg->mset_digest & AE_MSET_DIGEST_SHA512))
+
                archive_sha512_final(&mtree->sha512ctx, reg->digest.sha512);
 #endif
        /* Save what types of sum are computed. */

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h:1.10 pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h:1.11
--- pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h:1.10   Sun Sep 15 07:02:20 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_entry_private.h        Wed May 21 15:25:50 2025
@@ -174,6 +174,13 @@ struct archive_entry {
        size_t mac_metadata_size;
 
        /* Digest support. */
+#define AE_MSET_DIGEST_MD5      1
+#define AE_MSET_DIGEST_RMD160   2
+#define AE_MSET_DIGEST_SHA1     4
+#define AE_MSET_DIGEST_SHA256   8
+#define AE_MSET_DIGEST_SHA384  16
+#define AE_MSET_DIGEST_SHA512  32
+       uint_least32_t mset_digest;
        struct ae_digest digest;
 
        /* ACL support. */
@@ -195,8 +202,4 @@ struct archive_entry {
        int ae_symlink_type;
 };
 
-int
-archive_entry_set_digest(struct archive_entry *entry, int type,
-    const unsigned char *digest);
-
-#endif /* ARCHIVE_ENTRY_PRIVATE_H_INCLUDED */
+#endif /* !ARCHIVE_ENTRY_PRIVATE_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_windows.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_windows.c:1.10 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_windows.c:1.11
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_windows.c:1.10       Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_windows.c    Wed May 21 15:25:51 2025
@@ -41,6 +41,7 @@
 #include "archive_entry.h"
 #include "archive_private.h"
 #include "archive_read_disk_private.h"
+#include "archive_time_private.h"
 
 #ifndef O_BINARY
 #define O_BINARY       0
@@ -49,7 +50,7 @@
 /* Old SDKs do not provide IO_REPARSE_TAG_SYMLINK */
 #define        IO_REPARSE_TAG_SYMLINK 0xA000000CL
 #endif
-/* To deal with absolute symlink isuues */
+/* To deal with absolute symlink issues */
 #define START_ABSOLUTE_SYMLINK_REPARSE L"\\??\\"
 
 /*-
@@ -602,7 +603,7 @@ _archive_read_close(struct archive *_a)
 
 static void
 setup_symlink_mode(struct archive_read_disk *a, char symlink_mode, 
-    int follow_symlinks)
+    char follow_symlinks)
 {
        a->symlink_mode = symlink_mode;
        a->follow_symlinks = follow_symlinks;
@@ -1983,40 +1984,20 @@ tree_dir_next_windows(struct tree *t, co
        }
 }
 
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
-static void
-fileTimeToUtc(const FILETIME *filetime, time_t *t, long *ns)
-{
-       ULARGE_INTEGER utc;
-
-       utc.HighPart = filetime->dwHighDateTime;
-       utc.LowPart  = filetime->dwLowDateTime;
-       if (utc.QuadPart >= EPOC_TIME) {
-               utc.QuadPart -= EPOC_TIME;
-               /* milli seconds base */
-               *t = (time_t)(utc.QuadPart / 10000000);
-               /* nano seconds base */
-               *ns = (long)(utc.QuadPart % 10000000) * 100;
-       } else {
-               *t = 0;
-               *ns = 0;
-       }
-}
-
 static void
 entry_copy_bhfi(struct archive_entry *entry, const wchar_t *path,
        const WIN32_FIND_DATAW *findData,
        const BY_HANDLE_FILE_INFORMATION *bhfi)
 {
-       time_t secs;
-       long nsecs;
+       int64_t secs;
+       uint32_t nsecs;
        mode_t mode;
 
-       fileTimeToUtc(&bhfi->ftLastAccessTime, &secs, &nsecs);
+       ntfs_to_unix(FILETIME_to_ntfs(&bhfi->ftLastAccessTime), &secs, &nsecs);
        archive_entry_set_atime(entry, secs, nsecs);
-       fileTimeToUtc(&bhfi->ftLastWriteTime, &secs, &nsecs);
+       ntfs_to_unix(FILETIME_to_ntfs(&bhfi->ftLastWriteTime), &secs, &nsecs);
        archive_entry_set_mtime(entry, secs, nsecs);
-       fileTimeToUtc(&bhfi->ftCreationTime, &secs, &nsecs);
+       ntfs_to_unix(FILETIME_to_ntfs(&bhfi->ftCreationTime), &secs, &nsecs);
        archive_entry_set_birthtime(entry, secs, nsecs);
        archive_entry_set_ctime(entry, secs, nsecs);
        archive_entry_set_dev(entry, bhfi_dev(bhfi));
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c:1.10 pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c:1.11
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c:1.10  Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_open_file.c       Wed May 21 15:25:51 2025
@@ -52,6 +52,7 @@
 struct read_FILE_data {
        FILE    *f;
        size_t   block_size;
+       int64_t  size;
        void    *buffer;
        char     can_skip;
 };
@@ -91,6 +92,7 @@ archive_read_open_FILE(struct archive *a
                archive_read_extract_set_skip_file(a, st.st_dev, st.st_ino);
                /* Enable the seek optimization only for regular files. */
                mine->can_skip = 1;
+               mine->size = st.st_size;
        }
 
 #if defined(__CYGWIN__) || defined(_WIN32)
@@ -130,6 +132,7 @@ FILE_skip(struct archive *a, void *clien
 #else
        long skip = (long)request;
 #endif
+       int64_t old_offset, new_offset;
        int skip_bits = sizeof(skip) * 8 - 1;
 
        (void)a; /* UNUSED */
@@ -145,7 +148,7 @@ FILE_skip(struct archive *a, void *clien
 
        /* If request is too big for a long or an off_t, reduce it. */
        if (sizeof(request) > sizeof(skip)) {
-               int64_t max_skip =
+               const int64_t max_skip =
                    (((int64_t)1 << (skip_bits - 1)) - 1) * 2 + 1;
                if (request > max_skip)
                        skip = max_skip;
@@ -153,19 +156,33 @@ FILE_skip(struct archive *a, void *clien
 
 #ifdef __ANDROID__
         /* fileno() isn't safe on all platforms ... see above. */
-       if (lseek(fileno(mine->f), skip, SEEK_CUR) < 0)
+       old_offset = lseek(fileno(mine->f), 0, SEEK_CUR);
 #elif HAVE__FSEEKI64
-       if (_fseeki64(mine->f, skip, SEEK_CUR) != 0)
+       old_offset = _ftelli64(mine->f);
 #elif HAVE_FSEEKO
-       if (fseeko(mine->f, skip, SEEK_CUR) != 0)
+       old_offset = ftello(mine->f);
 #else
-       if (fseek(mine->f, skip, SEEK_CUR) != 0)
+       old_offset = ftell(mine->f);
 #endif
-       {
-               mine->can_skip = 0;
-               return (0);
+       if (old_offset >= 0) {
+               if (old_offset < mine->size &&
+                   skip <= mine->size - old_offset) {
+#ifdef __ANDROID__
+                       new_offset = lseek(fileno(mine->f), skip, SEEK_CUR);
+#elif HAVE__FSEEKI64
+                       new_offset = _fseeki64(mine->f, skip, SEEK_CUR);
+#elif HAVE_FSEEKO
+                       new_offset = fseeko(mine->f, skip, SEEK_CUR);
+#else
+                       new_offset = fseek(mine->f, skip, SEEK_CUR);
+#endif
+                       if (new_offset >= 0)
+                               return (new_offset - old_offset);
+               }
        }
-       return (request);
+
+       mine->can_skip = 0;
+       return (0);
 }
 
 /*
@@ -176,39 +193,42 @@ FILE_seek(struct archive *a, void *clien
 {
        struct read_FILE_data *mine = (struct read_FILE_data *)client_data;
 #if HAVE__FSEEKI64
-       int64_t skip = request;
+       int64_t seek = request;
 #elif HAVE_FSEEKO
-       off_t skip = (off_t)request;
+       off_t seek = (off_t)request;
 #else
-       long skip = (long)request;
+       long seek = (long)request;
 #endif
-       int skip_bits = sizeof(skip) * 8 - 1;
+       int seek_bits = sizeof(seek) * 8 - 1;
        (void)a; /* UNUSED */
 
-       /* If request is too big for a long or an off_t, reduce it. */
-       if (sizeof(request) > sizeof(skip)) {
-               int64_t max_skip =
-                   (((int64_t)1 << (skip_bits - 1)) - 1) * 2 + 1;
-               if (request > max_skip)
-                       skip = max_skip;
+       /* Reduce a request that would overflow the 'seek' variable. */
+       if (sizeof(request) > sizeof(seek)) {
+               const int64_t max_seek =
+                   (((int64_t)1 << (seek_bits - 1)) - 1) * 2 + 1;
+               const int64_t min_seek = ~max_seek;
+               if (request > max_seek)
+                       seek = max_seek;
+               else if (request < min_seek)
+                       seek = min_seek;
        }
 
 #ifdef __ANDROID__
        /* Newer Android versions have fseeko...to meditate. */
-       int64_t ret = lseek(fileno(mine->f), skip, whence);
+       int64_t ret = lseek(fileno(mine->f), seek, whence);
        if (ret >= 0) {
                return ret;
        }
 #elif HAVE__FSEEKI64
-       if (_fseeki64(mine->f, skip, whence) == 0) {
+       if (_fseeki64(mine->f, seek, whence) == 0) {
                return _ftelli64(mine->f);
        }
 #elif HAVE_FSEEKO
-       if (fseeko(mine->f, skip, whence) == 0) {
+       if (fseeko(mine->f, seek, whence) == 0) {
                return ftello(mine->f);
        }
 #else
-       if (fseek(mine->f, skip, whence) == 0) {
+       if (fseek(mine->f, seek, whence) == 0) {
                return ftell(mine->f);
        }
 #endif
@@ -226,4 +246,4 @@ FILE_close(struct archive *a, void *clie
        free(mine->buffer);
        free(mine);
        return (ARCHIVE_OK);
-}
\ No newline at end of file
+}
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c:1.10 pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c:1.11
--- pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c:1.10 Fri Apr 12 15:39:52 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_windows.c      Wed May 21 15:25:51 2025
@@ -47,6 +47,7 @@
 #include "archive_platform.h"
 #include "archive_private.h"
 #include "archive_entry.h"
+#include "archive_time_private.h"
 #include <ctype.h>
 #include <errno.h>
 #include <stddef.h>
@@ -61,8 +62,6 @@
 #include <windows.h>
 #include <share.h>
 
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
-
 #if defined(__LA_LSEEK_NEEDED)
 static BOOL SetFilePointerEx_perso(HANDLE hFile,
                                   LARGE_INTEGER liDistanceToMove,
@@ -450,24 +449,6 @@ __la_read(int fd, void *buf, size_t nbyt
        return ((ssize_t)bytes_read);
 }
 
-/* Convert Windows FILETIME to UTC */
-__inline static void
-fileTimeToUTC(const FILETIME *filetime, time_t *t, long *ns)
-{
-       ULARGE_INTEGER utc;
-
-       utc.HighPart = filetime->dwHighDateTime;
-       utc.LowPart  = filetime->dwLowDateTime;
-       if (utc.QuadPart >= EPOC_TIME) {
-               utc.QuadPart -= EPOC_TIME;
-               *t = (time_t)(utc.QuadPart / 10000000); /* milli seconds base */
-               *ns = (long)(utc.QuadPart % 10000000) * 100;/* nano seconds base */
-       } else {
-               *t = 0;
-               *ns = 0;
-       }
-}
-
 /* Stat by handle
  * Windows' stat() does not accept the path added "\\?\" especially "?"
  * character.
@@ -487,8 +468,6 @@ __hstat(HANDLE handle, struct ustat *st)
        ULARGE_INTEGER ino64;
        DWORD ftype;
        mode_t mode;
-       time_t t;
-       long ns;
 
        switch (ftype = GetFileType(handle)) {
        case FILE_TYPE_UNKNOWN:
@@ -544,15 +523,9 @@ __hstat(HANDLE handle, struct ustat *st)
                mode |= S_IFREG;
        st->st_mode = mode;
 
-       fileTimeToUTC(&info.ftLastAccessTime, &t, &ns);
-       st->st_atime = t;
-       st->st_atime_nsec = ns;
-       fileTimeToUTC(&info.ftLastWriteTime, &t, &ns);
-       st->st_mtime = t;
-       st->st_mtime_nsec = ns;
-       fileTimeToUTC(&info.ftCreationTime, &t, &ns);
-       st->st_ctime = t;
-       st->st_ctime_nsec = ns;
+       ntfs_to_unix(FILETIME_to_ntfs(&info.ftLastAccessTime), &st->st_atime, &st->st_atime_nsec);
+       ntfs_to_unix(FILETIME_to_ntfs(&info.ftLastWriteTime), &st->st_mtime, &st->st_mtime_nsec);
+       ntfs_to_unix(FILETIME_to_ntfs(&info.ftCreationTime), &st->st_ctime, &st->st_ctime_nsec);
        st->st_size =
            ((int64_t)(info.nFileSizeHigh) * ((int64_t)MAXDWORD + 1))
                + (int64_t)(info.nFileSizeLow);
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_windows.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_windows.c:1.10 pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_windows.c:1.11
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_windows.c:1.10      Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_disk_windows.c   Wed May 21 15:25:51 2025
@@ -60,6 +60,7 @@
 #include "archive_string.h"
 #include "archive_entry.h"
 #include "archive_private.h"
+#include "archive_time_private.h"
 
 #ifndef O_BINARY
 #define O_BINARY 0
@@ -637,7 +638,7 @@ la_CreateHardLinkW(wchar_t *linkname, wc
 }
 
 /*
- * Create file or directory symolic link
+ * Create file or directory symbolic link
  *
  * If linktype is AE_SYMLINK_TYPE_UNDEFINED (or unknown), guess linktype from
  * the link target
@@ -2605,10 +2606,6 @@ set_times(struct archive_write_disk *a,
     time_t mtime, long mtime_nanos,
     time_t ctime_sec, long ctime_nanos)
 {
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
-#define WINTIME(sec, nsec) (((sec * 10000000LL) + EPOC_TIME)\
-        + ((nsec)/100))
-
        HANDLE hw = 0;
        ULARGE_INTEGER wintm;
        FILETIME *pfbtime;
@@ -2646,17 +2643,17 @@ set_times(struct archive_write_disk *a,
                h = hw;
        }
 
-       wintm.QuadPart = WINTIME(atime, atime_nanos);
+       wintm.QuadPart = unix_to_ntfs(atime, atime_nanos);
        fatime.dwLowDateTime = wintm.LowPart;
        fatime.dwHighDateTime = wintm.HighPart;
-       wintm.QuadPart = WINTIME(mtime, mtime_nanos);
+       wintm.QuadPart = unix_to_ntfs(mtime, mtime_nanos);
        fmtime.dwLowDateTime = wintm.LowPart;
        fmtime.dwHighDateTime = wintm.HighPart;
        /*
         * SetFileTime() supports birthtime.
         */
        if (birthtime > 0 || birthtime_nanos > 0) {
-               wintm.QuadPart = WINTIME(birthtime, birthtime_nanos);
+               wintm.QuadPart = unix_to_ntfs(birthtime, birthtime_nanos);
                fbtime.dwLowDateTime = wintm.LowPart;
                fbtime.dwHighDateTime = wintm.HighPart;
                pfbtime = &fbtime;
@@ -2878,34 +2875,16 @@ set_xattrs(struct archive_write_disk *a)
        return (ARCHIVE_OK);
 }
 
-static void
-fileTimeToUtc(const FILETIME *filetime, time_t *t, long *ns)
-{
-       ULARGE_INTEGER utc;
-
-       utc.HighPart = filetime->dwHighDateTime;
-       utc.LowPart  = filetime->dwLowDateTime;
-       if (utc.QuadPart >= EPOC_TIME) {
-               utc.QuadPart -= EPOC_TIME;
-               /* milli seconds base */
-               *t = (time_t)(utc.QuadPart / 10000000);
-               /* nano seconds base */
-               *ns = (long)(utc.QuadPart % 10000000) * 100;
-       } else {
-               *t = 0;
-               *ns = 0;
-       }
-}
 /*
  * Test if file on disk is older than entry.
  */
 static int
 older(BY_HANDLE_FILE_INFORMATION *st, struct archive_entry *entry)
 {
-       time_t sec;
-       long nsec;
+       int64_t sec;
+       uint32_t nsec;
 
-       fileTimeToUtc(&st->ftLastWriteTime, &sec, &nsec);
+       ntfs_to_unix(FILETIME_to_ntfs(&st->ftLastWriteTime), &sec, &nsec);
        /* First, test the seconds and return if we have a definite answer. */
        /* Definitely older. */
        if (sec < archive_entry_mtime(entry))
@@ -2913,11 +2892,10 @@ older(BY_HANDLE_FILE_INFORMATION *st, st
        /* Definitely younger. */
        if (sec > archive_entry_mtime(entry))
                return (0);
-       if (nsec < archive_entry_mtime_nsec(entry))
+       if ((long)nsec < archive_entry_mtime_nsec(entry))
                return (1);
        /* Same age or newer, so not older. */
        return (0);
 }
 
 #endif /* _WIN32 && !__CYGWIN__ */
-

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_random_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_random_private.h:1.2 pkgsrc/archivers/libarchive/files/libarchive/archive_random_private.h:1.3
--- pkgsrc/archivers/libarchive/files/libarchive/archive_random_private.h:1.2   Tue May 26 09:16:42 2020
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_random_private.h       Wed May 21 15:25:51 2025
@@ -33,4 +33,4 @@
 /* Random number generator. */
 int archive_random(void *buf, size_t nbytes);
 
-#endif /* ARCHIVE_RANDOM_PRIVATE_H_INCLUDED */
+#endif /* !ARCHIVE_RANDOM_PRIVATE_H_INCLUDED */
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_rb.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_rb.h:1.2 pkgsrc/archivers/libarchive/files/libarchive/archive_rb.h:1.3
--- pkgsrc/archivers/libarchive/files/libarchive/archive_rb.h:1.2       Tue May 26 09:16:42 2020
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_rb.h   Wed May 21 15:25:51 2025
@@ -110,4 +110,4 @@ struct archive_rb_node *
        __archive_rb_tree_iterate(struct archive_rb_tree *,
        struct archive_rb_node *, const unsigned int);
 
-#endif /* ARCHIVE_RB_H_*/
+#endif /* !ARCHIVE_RB_H_INCLUDED */

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read.c:1.15 pkgsrc/archivers/libarchive/files/libarchive/archive_read.c:1.16
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read.c:1.15    Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read.c Wed May 21 15:25:51 2025
@@ -176,15 +176,9 @@ client_skip_proxy(struct archive_read_fi
                return 0;
 
        if (self->archive->client.skipper != NULL) {
-               /* Seek requests over 1GiB are broken down into
-                * multiple seeks.  This avoids overflows when the
-                * requests get passed through 32-bit arguments. */
-               int64_t skip_limit = (int64_t)1 << 30;
                int64_t total = 0;
                for (;;) {
                        int64_t get, ask = request;
-                       if (ask > skip_limit)
-                               ask = skip_limit;
                        get = (self->archive->client.skipper)
                                (&self->archive->archive, self->data, ask);
                        total += get;

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h:1.7 pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h:1.8
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h:1.7        Fri Apr 12 15:39:51 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_disk_private.h    Wed May 21 15:25:51 2025
@@ -52,10 +52,11 @@ struct archive_read_disk {
 
        /*
         * Since symlink interaction changes, we need to track whether
-        * we're following symlinks for the current item.  'L' mode above
-        * sets this true, 'P' sets it false, 'H' changes it as we traverse.
+        * we're following symlinks for the current item, governed by the above
+        * symlink_mode.  'L' sets this true, 'P' sets it false, 'H' changes it
+        * as we traverse.
         */
-       char    follow_symlinks;  /* Either 'L' or 'P'. */
+       char    follow_symlinks;  /* Either 0 or 1. */
 
        /* Directory traversals. */
        struct tree *tree;
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c:1.7 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c:1.8
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c:1.7 Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar5.c     Wed May 21 15:25:51 2025
@@ -46,6 +46,7 @@
 #include "archive_entry_locale.h"
 #include "archive_ppmd7_private.h"
 #include "archive_entry_private.h"
+#include "archive_time_private.h"
 
 #ifdef HAVE_BLAKE2_H
 #include <blake2.h>
@@ -100,10 +101,12 @@ struct file_header {
        uint8_t dir : 1;             /* Is this file entry a directory? */
 
        /* Optional time fields. */
-       uint64_t e_mtime;
-       uint64_t e_ctime;
-       uint64_t e_atime;
-       uint32_t e_unix_ns;
+       int64_t e_mtime;
+       int64_t e_ctime;
+       int64_t e_atime;
+       uint32_t e_mtime_ns;
+       uint32_t e_ctime_ns;
+       uint32_t e_atime_ns;
 
        /* Optional hash fields. */
        uint32_t stored_crc32;
@@ -1101,22 +1104,22 @@ static int read_consume_bits(struct arch
        return ARCHIVE_OK;
 }
 
-static int read_u32(struct archive_read* a, uint32_t* pvalue) {
+static char read_u32(struct archive_read* a, uint32_t* pvalue) {
        const uint8_t* p;
        if(!read_ahead(a, 4, &p))
                return 0;
 
        *pvalue = archive_le32dec(p);
-       return ARCHIVE_OK == consume(a, 4) ? 1 : 0;
+       return ARCHIVE_OK == consume(a, 4);
 }
 
-static int read_u64(struct archive_read* a, uint64_t* pvalue) {
+static char read_u64(struct archive_read* a, uint64_t* pvalue) {
        const uint8_t* p;
        if(!read_ahead(a, 8, &p))
                return 0;
 
        *pvalue = archive_le64dec(p);
-       return ARCHIVE_OK == consume(a, 8) ? 1 : 0;
+       return ARCHIVE_OK == consume(a, 8);
 }
 
 static int bid_standard(struct archive_read* a) {
@@ -1301,14 +1304,8 @@ static int parse_file_extra_hash(struct 
        return ARCHIVE_OK;
 }
 
-static uint64_t time_win_to_unix(uint64_t win_time) {
-       const size_t ns_in_sec = 10000000;
-       const uint64_t sec_to_unix = 11644473600LL;
-       return win_time / ns_in_sec - sec_to_unix;
-}
-
 static int parse_htime_item(struct archive_read* a, char unix_time,
-    uint64_t* where, int64_t* extra_data_size)
+    int64_t* sec, uint32_t* nsec, int64_t* extra_data_size)
 {
        if(unix_time) {
                uint32_t time_val;
@@ -1316,13 +1313,13 @@ static int parse_htime_item(struct archi
                        return ARCHIVE_EOF;
 
                *extra_data_size -= 4;
-               *where = (uint64_t) time_val;
+               *sec = (int64_t) time_val;
        } else {
                uint64_t windows_time;
                if(!read_u64(a, &windows_time))
                        return ARCHIVE_EOF;
 
-               *where = time_win_to_unix(windows_time);
+               ntfs_to_unix(windows_time, sec, nsec);
                *extra_data_size -= 8;
        }
 
@@ -1386,7 +1383,7 @@ static int parse_file_extra_version(stru
 static int parse_file_extra_htime(struct archive_read* a,
     struct archive_entry* e, struct rar5* rar, int64_t* extra_data_size)
 {
-       char unix_time = 0;
+       char unix_time, has_unix_ns, has_mtime, has_ctime, has_atime;
        size_t flags = 0;
        size_t value_len;
 
@@ -1407,32 +1404,62 @@ static int parse_file_extra_htime(struct
        }
 
        unix_time = flags & IS_UNIX;
+       has_unix_ns = unix_time && (flags & HAS_UNIX_NS);
+       has_mtime = flags & HAS_MTIME;
+       has_atime = flags & HAS_ATIME;
+       has_ctime = flags & HAS_CTIME;
+       rar->file.e_atime_ns = rar->file.e_ctime_ns = rar->file.e_mtime_ns = 0;
 
-       if(flags & HAS_MTIME) {
+       if(has_mtime) {
                parse_htime_item(a, unix_time, &rar->file.e_mtime,
-                   extra_data_size);
-               archive_entry_set_mtime(e, rar->file.e_mtime, 0);
+                   &rar->file.e_mtime_ns, extra_data_size);
        }
 
-       if(flags & HAS_CTIME) {
+       if(has_ctime) {
                parse_htime_item(a, unix_time, &rar->file.e_ctime,
-                   extra_data_size);
-               archive_entry_set_ctime(e, rar->file.e_ctime, 0);
+                   &rar->file.e_ctime_ns, extra_data_size);
        }
 
-       if(flags & HAS_ATIME) {
+       if(has_atime) {
                parse_htime_item(a, unix_time, &rar->file.e_atime,
-                   extra_data_size);
-               archive_entry_set_atime(e, rar->file.e_atime, 0);
+                   &rar->file.e_atime_ns, extra_data_size);
        }
 
-       if(flags & HAS_UNIX_NS) {
-               if(!read_u32(a, &rar->file.e_unix_ns))
+       if(has_mtime && has_unix_ns) {
+               if(!read_u32(a, &rar->file.e_mtime_ns))
                        return ARCHIVE_EOF;
 
                *extra_data_size -= 4;
        }
 
+       if(has_ctime && has_unix_ns) {
+               if(!read_u32(a, &rar->file.e_ctime_ns))
+                       return ARCHIVE_EOF;
+
+               *extra_data_size -= 4;
+       }
+
+       if(has_atime && has_unix_ns) {
+               if(!read_u32(a, &rar->file.e_atime_ns))
+                       return ARCHIVE_EOF;
+
+               *extra_data_size -= 4;
+       }
+
+       /* The seconds and nanoseconds are either together, or separated in two
+        * fields so we parse them, then set the archive_entry's times. */
+       if(has_mtime) {
+               archive_entry_set_mtime(e, rar->file.e_mtime, rar->file.e_mtime_ns);
+       }
+
+       if(has_ctime) {
+               archive_entry_set_ctime(e, rar->file.e_ctime, rar->file.e_ctime_ns);
+       }
+
+       if(has_atime) {
+               archive_entry_set_atime(e, rar->file.e_atime, rar->file.e_atime_ns);
+       }
+
        return ARCHIVE_OK;
 }
 
@@ -3095,7 +3122,7 @@ static int do_uncompress_block(struct ar
                 *   can be stored in the output buffer directly.
                 *
                 * - Code 256 defines a new filter, which is later used to
-                *   ransform the data block accordingly to the filter type.
+                *   transform the data block accordingly to the filter type.
                 *   The data block needs to be fully uncompressed first.
                 *
                 * - Code bigger than 257 and smaller than 262 define

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c:1.12 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c:1.13
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c:1.12        Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c     Wed May 21 15:25:51 2025
@@ -53,6 +53,7 @@
 #include "archive_ppmd7_private.h"
 #include "archive_private.h"
 #include "archive_read_private.h"
+#include "archive_time_private.h"
 #include "archive_endian.h"
 
 #ifndef HAVE_ZLIB_H
@@ -62,7 +63,26 @@
 #define _7ZIP_SIGNATURE        "7z\xBC\xAF\x27\x1C"
 #define SFX_MIN_ADDR   0x27000
 #define SFX_MAX_ADDR   0x60000
+#define SFX_MAX_OFFSET (SFX_MAX_ADDR - SFX_MIN_ADDR)
 
+/*
+ * PE format
+ */
+#define PE_DOS_HDR_LEN                         0x40
+#define PE_DOS_HDR_ELFANEW_OFFSET      0x3c
+#define PE_COFF_HDR_LEN                                0x18
+#define PE_COFF_HDR_SEC_CNT_OFFSET     0x6
+#define PE_COFF_HDR_OPT_SZ_OFFSET      0x14
+#define PE_SEC_HDR_LEN                                 0x28
+#define PE_SEC_HDR_RAW_ADDR_OFFSET     0x14
+#define PE_SEC_HDR_RAW_SZ_OFFSET       0x10
+
+/*
+ * ELF format
+ */
+#define ELF_HDR_MIN_LEN 0x34
+#define ELF_HDR_EI_CLASS_OFFSET 0x04
+#define ELF_HDR_EI_DATA_OFFSET 0x05
 
 /*
  * Codec ID
@@ -86,6 +106,7 @@
 #define _7Z_ARM                0x03030501
 #define _7Z_ARMTHUMB   0x03030701
 #define _7Z_ARM64      0xa
+#define _7Z_RISCV      0xb
 #define _7Z_SPARC      0x03030805
 
 #define _7Z_ZSTD       0x4F71101 /* Copied from https://github.com/mcmilk/7-Zip-zstd.git */
@@ -147,7 +168,6 @@ struct _7z_digests {
        uint32_t        *digests;
 };
 
-
 struct _7z_folder {
        uint64_t                 numCoders;
        struct _7z_coder {
@@ -227,13 +247,13 @@ struct _7zip_entry {
 #define CRC32_IS_SET   (1<<3)
 #define HAS_STREAM     (1<<4)
 
-       time_t                   mtime;
-       time_t                   atime;
-       time_t                   ctime;
-       long                     mtime_ns;
-       long                     atime_ns;
-       long                     ctime_ns;
-       uint32_t                 mode;
+       int64_t                  mtime;
+       int64_t                  atime;
+       int64_t                  ctime;
+       uint32_t                 mtime_ns;
+       uint32_t                 atime_ns;
+       uint32_t                 ctime_ns;
+       __LA_MODE_T              mode;
        uint32_t                 attr;
 };
 
@@ -391,7 +411,6 @@ static int  decode_encoded_header_info(st
 static int     decompress(struct archive_read *, struct _7zip *,
                    void *, size_t *, const void *, size_t *);
 static ssize_t extract_pack_stream(struct archive_read *, size_t);
-static void    fileTimeToUtc(uint64_t, time_t *, long *);
 static uint64_t folder_uncompressed_size(struct _7z_folder *);
 static void    free_CodersInfo(struct _7z_coders_info *);
 static void    free_Digest(struct _7z_digests *);
@@ -427,7 +446,9 @@ static ssize_t      read_stream(struct archiv
                    size_t);
 static int     seek_pack(struct archive_read *);
 static int64_t skip_stream(struct archive_read *, size_t);
-static int     skip_sfx(struct archive_read *, ssize_t);
+static int     skip_sfx(struct archive_read *, const ssize_t);
+static ssize_t find_pe_overlay(struct archive_read *);
+static ssize_t find_elf_data_sec(struct archive_read *);
 static int     slurp_central_directory(struct archive_read *, struct _7zip *,
                    struct _7z_header_info *);
 static int     setup_decode_folder(struct archive_read *, struct _7z_folder *,
@@ -527,15 +548,17 @@ archive_read_format_7zip_bid(struct arch
         * It may a 7-Zip SFX archive file. If first two bytes are
         * 'M' and 'Z' available on Windows or first four bytes are
         * "\x7F\x45LF" available on posix like system, seek the 7-Zip
-        * signature. Although we will perform a seek when reading
-        * a header, what we do not use __archive_read_seek() here is
-        * due to a bidding performance.
+        * signature. While find_pe_overlay can be performed without
+        * performing a seek, find_elf_data_sec requires one,
+        * thus a performance difference between the two is expected. 
         */
        if ((p[0] == 'M' && p[1] == 'Z') || memcmp(p, "\x7F\x45LF", 4) == 0) {
-               ssize_t offset = SFX_MIN_ADDR;
+               const ssize_t min_addr = p[0] == 'M' ? find_pe_overlay(a) :
+                                                      find_elf_data_sec(a);
+               ssize_t offset = min_addr;
                ssize_t window = 4096;
                ssize_t bytes_avail;
-               while (offset + window <= (SFX_MAX_ADDR)) {
+               while (offset + window <= (min_addr + SFX_MAX_OFFSET)) {
                        const char *buff = __archive_read_ahead(a,
                                        offset + window, &bytes_avail);
                        if (buff == NULL) {
@@ -585,21 +608,14 @@ check_7zip_header_in_sfx(const char *p)
 }
 
 static int
-skip_sfx(struct archive_read *a, ssize_t bytes_avail)
+skip_sfx(struct archive_read *a, const ssize_t min_addr)
 {
        const void *h;
        const char *p, *q;
        size_t skip, offset;
        ssize_t bytes, window;
 
-       /*
-        * If bytes_avail > SFX_MIN_ADDR we do not have to call
-        * __archive_read_seek() at this time since we have
-        * already had enough data.
-        */
-       if (bytes_avail > SFX_MIN_ADDR)
-               __archive_read_consume(a, SFX_MIN_ADDR);
-       else if (__archive_read_seek(a, SFX_MIN_ADDR, SEEK_SET) < 0)
+       if (__archive_read_seek(a, min_addr, SEEK_SET) < 0)
                return (ARCHIVE_FATAL);
 
        offset = 0;
@@ -632,7 +648,7 @@ skip_sfx(struct archive_read *a, ssize_t
                                    (struct _7zip *)a->format->data;
                                skip = p - (const char *)h;
                                __archive_read_consume(a, skip);
-                               zip->seek_base = SFX_MIN_ADDR + offset + skip;
+                               zip->seek_base = min_addr + offset + skip;
                                return (ARCHIVE_OK);
                        }
                        p += step;
@@ -649,6 +665,207 @@ fatal:
        return (ARCHIVE_FATAL);
 }
 
+static ssize_t
+find_pe_overlay(struct archive_read *a)
+{
+       const char *h;
+       ssize_t bytes, max_offset, offset, sec_end;
+       ssize_t opt_hdr_sz, sec_cnt;
+
+       for (;;) {
+               /*
+                * Read Dos header to find e_lfanew
+                */
+               h = __archive_read_ahead(a, PE_DOS_HDR_LEN, &bytes);
+               if (h == NULL || h[0] != 'M' || h[1] != 'Z') {
+                       break;
+               }
+               offset = archive_le32dec(h + PE_DOS_HDR_ELFANEW_OFFSET);
+
+               /*
+                * Read COFF header to find opt header size and sec cnt
+                */
+               if (bytes < offset + PE_COFF_HDR_LEN) {
+                       h = __archive_read_ahead(a, offset + PE_COFF_HDR_LEN,
+                           &bytes);
+                       if (h == NULL || h[offset] != 'P' ||
+                           h[offset + 1] != 'E') {
+                               break;
+                       }
+               }
+               sec_cnt = archive_le16dec(
+                   h + offset + PE_COFF_HDR_SEC_CNT_OFFSET);
+               opt_hdr_sz = archive_le16dec(
+                   h + offset + PE_COFF_HDR_OPT_SZ_OFFSET);
+
+               /*
+                * Skip optional header
+                */
+               if (opt_hdr_sz != 0) {
+                       offset += PE_COFF_HDR_LEN + opt_hdr_sz;
+               } else {
+                       break;
+               }
+
+               /*
+                * Traverse sec table to find max raw offset (i.e., overlay)
+                */
+               if (bytes < offset + sec_cnt * PE_SEC_HDR_LEN) {
+                       h = __archive_read_ahead(a,
+                           offset + sec_cnt * PE_SEC_HDR_LEN, NULL);
+                       if (h == NULL) {
+                               break;
+                       }
+               }
+               max_offset = offset;
+               while (sec_cnt > 0) {
+                       sec_end = archive_le32dec(
+                                     h + offset + PE_SEC_HDR_RAW_SZ_OFFSET) +
+                           archive_le32dec(
+                               h + offset + PE_SEC_HDR_RAW_ADDR_OFFSET);
+                       if (sec_end > max_offset) {
+                               max_offset = sec_end;
+                       }
+                       offset += PE_SEC_HDR_LEN;
+                       sec_cnt--;
+               }
+               return (max_offset);
+       }
+
+       /*
+        * If encounter any weirdness, revert to old brute-force style search
+        */
+       return (SFX_MIN_ADDR);
+}
+
+static ssize_t
+find_elf_data_sec(struct archive_read *a)
+{
+       const char *h;
+       char big_endian, format_64;
+       ssize_t bytes, min_addr = SFX_MIN_ADDR;
+       uint64_t e_shoff, strtab_offset, strtab_size;
+       uint16_t e_shentsize, e_shnum, e_shstrndx;
+       uint16_t (*dec16)(const void *);
+       uint32_t (*dec32)(const void *);
+       uint64_t (*dec64)(const void *);
+
+       for (;;) {
+               /*
+                * Read Elf header to find bitness & endianness
+                */
+               h = __archive_read_ahead(a, ELF_HDR_MIN_LEN, &bytes);
+               if (h == NULL || memcmp(h, "\x7F\x45LF", 4) != 0) {
+                       break;
+               }
+               format_64 = h[ELF_HDR_EI_CLASS_OFFSET] == 0x2;
+               big_endian = h[ELF_HDR_EI_DATA_OFFSET] == 0x2;
+               if (big_endian) {
+                       dec16 = &archive_be16dec;
+                       dec32 = &archive_be32dec;
+                       dec64 = &archive_be64dec;
+               } else {
+                       dec16 = &archive_le16dec;
+                       dec32 = &archive_le32dec;
+                       dec64 = &archive_le64dec;
+               }
+
+               /*
+                * Read section header table info
+                */
+               if (format_64) {
+                       e_shoff = (*dec64)(h + 0x28);
+                       e_shentsize = (*dec16)(h + 0x3A);
+                       e_shnum = (*dec16)(h + 0x3C);
+                       e_shstrndx = (*dec16)(h + 0x3E);
+                       if (e_shnum < e_shstrndx || e_shentsize < 0x28)
+                               break;
+
+               } else {
+                       e_shoff = (*dec32)(h + 0x20);
+                       e_shentsize = (*dec16)(h + 0x2E);
+                       e_shnum = (*dec16)(h + 0x30);
+                       e_shstrndx = (*dec16)(h + 0x32);
+                       if (e_shnum < e_shstrndx || e_shentsize < 0x18)
+                               break;
+               }
+
+               /*
+                * Reading the section table to find strtab section
+                */
+               if (__archive_read_seek(a, e_shoff, SEEK_SET) < 0) {
+                       break;
+               }
+               h = __archive_read_ahead(a, (size_t)e_shnum * (size_t)e_shentsize, NULL);
+               if (h == NULL) {
+                       break;
+               }
+               if (format_64) {
+                       strtab_offset = (*dec64)(
+                           h + e_shstrndx * e_shentsize + 0x18);
+                       strtab_size = (*dec64)(
+                           h + e_shstrndx * e_shentsize + 0x20);
+               } else {
+                       strtab_offset = (*dec32)(
+                           h + e_shstrndx * e_shentsize + 0x10);
+                       strtab_size = (*dec32)(
+                           h + e_shstrndx * e_shentsize + 0x14);
+               }
+
+               /*
+                * Read the STRTAB section to find the .data offset
+                */
+               if (__archive_read_seek(a, strtab_offset, SEEK_SET) < 0) {
+                       break;
+               }
+               h = __archive_read_ahead(a, strtab_size, NULL);
+               if (h == NULL) {
+                       break;
+               }
+               ssize_t data_sym_offset = -1;
+               for (size_t offset = 0; offset < strtab_size - 6; offset++) {
+                       if (memcmp(h + offset, ".data\00", 6) == 0) {
+                               data_sym_offset = offset;
+                               break;
+                       }
+               }
+               if (data_sym_offset == -1) {
+                       break;
+               }
+
+               /*
+                * Find the section with the .data name
+                */
+               if (__archive_read_seek(a, e_shoff, SEEK_SET) < 0) {
+                       break;
+               }
+               h = __archive_read_ahead(a, (size_t)e_shnum * (size_t)e_shentsize, NULL);
+               if (h == NULL) {
+                       break;
+               }
+               ssize_t sec_tbl_offset = 0, name_offset;
+               while (e_shnum > 0) {
+                       name_offset = (*dec32)(h + sec_tbl_offset);
+                       if (name_offset == data_sym_offset) {
+                               if (format_64) {
+                                       min_addr = (*dec64)(
+                                           h + sec_tbl_offset + 0x18);
+                               } else {
+                                       min_addr = (*dec32)(
+                                           h + sec_tbl_offset + 0x10);
+                               }
+                               break;
+                       }
+                       sec_tbl_offset += e_shentsize;
+                       e_shnum--;
+               }
+               break;
+       }
+
+       __archive_read_seek(a, 0, SEEK_SET);
+       return (min_addr);
+}
+
 static int
 archive_read_format_7zip_read_header(struct archive_read *a,
        struct archive_entry *entry)
@@ -1231,6 +1448,12 @@ init_decompression(struct archive_read *
                                fi++;
                                break;
 #endif
+#ifdef LZMA_FILTER_RISCV
+                       case _7Z_RISCV:
+                               filters[fi].id = LZMA_FILTER_RISCV;
+                               fi++;
+                               break;
+#endif
                        case _7Z_SPARC:
                                filters[fi].id = LZMA_FILTER_SPARC;
                                fi++;
@@ -1403,6 +1626,7 @@ init_decompression(struct archive_read *
        case _7Z_ARM:
        case _7Z_ARMTHUMB:
        case _7Z_ARM64:
+       case _7Z_RISCV:
        case _7Z_SPARC:
        case _7Z_DELTA:
                archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC,
@@ -2852,23 +3076,6 @@ read_Header(struct archive_read *a, stru
        return (0);
 }
 
-#define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000)
-static void
-fileTimeToUtc(uint64_t fileTime, time_t *timep, long *ns)
-{
-
-       if (fileTime >= EPOC_TIME) {
-               fileTime -= EPOC_TIME;
-               /* milli seconds base */
-               *timep = (time_t)(fileTime / 10000000);
-               /* nano seconds base */
-               *ns = (long)(fileTime % 10000000) * 100;
-       } else {
-               *timep = 0;
-               *ns = 0;
-       }
-}
-
 static int
 read_Times(struct archive_read *a, struct _7z_header_info *h, int type)
 {
@@ -2911,19 +3118,19 @@ read_Times(struct archive_read *a, struc
                        goto failed;
                switch (type) {
                case kCTime:
-                       fileTimeToUtc(archive_le64dec(p),
+                       ntfs_to_unix(archive_le64dec(p),
                            &(entries[i].ctime),
                            &(entries[i].ctime_ns));
                        entries[i].flg |= CTIME_IS_SET;
                        break;
                case kATime:
-                       fileTimeToUtc(archive_le64dec(p),
+                       ntfs_to_unix(archive_le64dec(p),
                            &(entries[i].atime),
                            &(entries[i].atime_ns));
                        entries[i].flg |= ATIME_IS_SET;
                        break;
                case kMTime:
-                       fileTimeToUtc(archive_le64dec(p),
+                       ntfs_to_unix(archive_le64dec(p),
                            &(entries[i].mtime),
                            &(entries[i].mtime_ns));
                        entries[i].flg |= MTIME_IS_SET;
@@ -3018,7 +3225,9 @@ slurp_central_directory(struct archive_r
 
        if ((p[0] == 'M' && p[1] == 'Z') || memcmp(p, "\x7F\x45LF", 4) == 0) {
                /* This is an executable ? Must be self-extracting... */
-               r = skip_sfx(a, bytes_avail);
+               const ssize_t min_addr = p[0] == 'M' ? find_pe_overlay(a) :
+                                                      find_elf_data_sec(a);
+               r = skip_sfx(a, min_addr);
                if (r < ARCHIVE_WARN)
                        return (r);
                if ((p = __archive_read_ahead(a, 32, &bytes_avail)) == NULL)
@@ -4312,4 +4521,3 @@ Bcj2_Decode(struct _7zip *zip, uint8_t *
 
        return ((ssize_t)outPos);
 }
-
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write.c:1.12 pkgsrc/archivers/libarchive/files/libarchive/archive_write.c:1.13
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write.c:1.12   Sat Oct 19 05:39:59 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write.c        Wed May 21 15:25:51 2025
@@ -283,7 +283,7 @@ __archive_write_filters_open(struct arch
 }
 
 /*
- * Close all filtes
+ * Close all filters
  */
 static int
 __archive_write_filters_close(struct archive_write *a)

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c:1.13 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c:1.14
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c:1.13        Sat Oct 19 05:39:58 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_cpio.c     Wed May 21 15:25:51 2025
@@ -189,6 +189,7 @@ struct cpio {
 };
 
 static int64_t atol16(const char *, unsigned);
+static uint64_t        atol16u(const char *, unsigned);
 static int64_t atol8(const char *, unsigned);
 static int     archive_read_format_cpio_bid(struct archive_read *, int);
 static int     archive_read_format_cpio_options(struct archive_read *,
@@ -835,6 +836,7 @@ header_afiol(struct archive_read *a, str
     struct archive_entry *entry, size_t *namelength, size_t *name_pad)
 {
        int64_t t;
+       uint64_t u;
        const void *h;
        const char *header;
 
@@ -851,12 +853,12 @@ header_afiol(struct archive_read *a, str
 
        archive_entry_set_dev(entry, 
                (dev_t)atol16(header + afiol_dev_offset, afiol_dev_size));
-       t = atol16(header + afiol_ino_offset, afiol_ino_size);
-       if (t < 0) {
-               archive_set_error(&a->archive, 0, "Nonsensical ino value");
-               return (ARCHIVE_FATAL);
-       }
-       archive_entry_set_ino(entry, t);
+       u = atol16u(header + afiol_ino_offset, afiol_ino_size);
+#if ARCHIVE_VERSION_NUMBER < 4000000
+       archive_entry_set_ino(entry, (int64_t)(u & INT64_MAX));
+#else
+       archive_entry_set_ino(entry, u);
+#endif
        archive_entry_set_mode(entry,
                (mode_t)atol8(header + afiol_mode_offset, afiol_mode_size));
        archive_entry_set_uid(entry, atol16(header + afiol_uid_offset, afiol_uid_size));
@@ -1031,6 +1033,12 @@ atol8(const char *p, unsigned char_cnt)
 static int64_t
 atol16(const char *p, unsigned char_cnt)
 {
+       return ((int64_t)atol16u(p, char_cnt));
+}
+
+static uint64_t
+atol16u(const char *p, unsigned char_cnt)
+{
        uint64_t l;
        int digit;
 
@@ -1048,7 +1056,7 @@ atol16(const char *p, unsigned char_cnt)
                l <<= 4;
                l |= digit;
        }
-       return ((int64_t)l);
+       return (l);
 }
 
 static int
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c:1.13 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c:1.14
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c:1.13 Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_rar.c      Wed May 21 15:25:51 2025
@@ -335,8 +335,8 @@ struct rar
   int found_first_header;
   char has_endarc_header;
   struct data_block_offsets *dbo;
-  unsigned int cursor;
-  unsigned int nodes;
+  size_t cursor;
+  size_t nodes;
   char filename_must_match;
 
   /* LZSS members */
@@ -451,7 +451,7 @@ static int read_filter(struct archive_re
 static int rar_decode_byte(struct archive_read*, uint8_t *);
 static int execute_filter(struct archive_read*, struct rar_filter *,
                           struct rar_virtual_machine *, size_t);
-static int copy_from_lzss_window(struct archive_read *, void *, int64_t, int);
+static int copy_from_lzss_window(struct archive_read *, uint8_t *, int64_t, int);
 static inline void vm_write_32(struct rar_virtual_machine*, size_t, uint32_t);
 static inline uint32_t vm_read_32(struct rar_virtual_machine*, size_t);
 
@@ -741,11 +741,11 @@ archive_read_support_format_rar(struct a
     return (ARCHIVE_FATAL);
   }
 
-       /*
-        * Until enough data has been read, we cannot tell about
-        * any encrypted entries yet.
-        */
-       rar->has_encrypted_entries = ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW;
+  /*
+   * Until enough data has been read, we cannot tell about
+   * any encrypted entries yet.
+   */
+  rar->has_encrypted_entries = ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW;
 
   r = __archive_read_register_format(a,
                                      rar,
@@ -768,21 +768,21 @@ archive_read_support_format_rar(struct a
 static int
 archive_read_support_format_rar_capabilities(struct archive_read * a)
 {
-       (void)a; /* UNUSED */
-       return (ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_DATA
-                       | ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_METADATA);
+  (void)a; /* UNUSED */
+  return (ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_DATA
+    | ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_METADATA);
 }
 
 static int
 archive_read_format_rar_has_encrypted_entries(struct archive_read *_a)
 {
-       if (_a && _a->format) {
-               struct rar * rar = (struct rar *)_a->format->data;
-               if (rar) {
-                       return rar->has_encrypted_entries;
-               }
-       }
-       return ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW;
+  if (_a && _a->format) {
+    struct rar * rar = (struct rar *)_a->format->data;
+    if (rar) {
+      return rar->has_encrypted_entries;
+    }
+  }
+  return ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW;
 }
 
 
@@ -793,7 +793,7 @@ archive_read_format_rar_bid(struct archi
 
   /* If there's already a bid > 30, we'll never win. */
   if (best_bid > 30)
-         return (-1);
+    return (-1);
 
   if ((p = __archive_read_ahead(a, 7, NULL)) == NULL)
     return (-1);
@@ -865,7 +865,7 @@ skip_sfx(struct archive_read *a)
     }
     skip = p - (const char *)h;
     __archive_read_consume(a, skip);
-       total += skip;
+    total += skip;
   }
 fatal:
   archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
@@ -910,7 +910,7 @@ archive_read_format_rar_read_header(stru
   const void *h;
   const char *p;
   struct rar *rar;
-  size_t skip;
+  int64_t skip;
   char head_type;
   int ret;
   unsigned flags;
@@ -930,7 +930,7 @@ archive_read_format_rar_read_header(stru
    * as well.
    */
   if (rar->has_encrypted_entries == ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW) {
-         rar->has_encrypted_entries = 0;
+    rar->has_encrypted_entries = 0;
   }
 
   /* RAR files can be generated without EOF headers, so return ARCHIVE_EOF if
@@ -953,8 +953,11 @@ archive_read_format_rar_read_header(stru
   {
     unsigned long crc32_val;
 
-    if ((h = __archive_read_ahead(a, 7, NULL)) == NULL)
+    if ((h = __archive_read_ahead(a, 7, NULL)) == NULL) {
+      archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                        "Failed to read next header.");
       return (ARCHIVE_FATAL);
+    }
     p = h;
 
     head_type = p[2];
@@ -972,7 +975,7 @@ archive_read_format_rar_read_header(stru
     case MAIN_HEAD:
       rar->main_flags = archive_le16dec(p + 3);
       skip = archive_le16dec(p + 5);
-      if (skip < 7 + sizeof(rar->reserved1) + sizeof(rar->reserved2)) {
+      if ((size_t)skip < 7 + sizeof(rar->reserved1) + sizeof(rar->reserved2)) {
         archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
           "Invalid header size");
         return (ARCHIVE_FATAL);
@@ -984,7 +987,8 @@ archive_read_format_rar_read_header(stru
       memcpy(rar->reserved2, p + 7 + sizeof(rar->reserved1),
              sizeof(rar->reserved2));
       if (rar->main_flags & MHD_ENCRYPTVER) {
-        if (skip < 7 + sizeof(rar->reserved1) + sizeof(rar->reserved2)+1) {
+        if ((size_t)skip <
+            7 + sizeof(rar->reserved1) + sizeof(rar->reserved2) + 1) {
           archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
             "Invalid header size");
           return (ARCHIVE_FATAL);
@@ -1053,28 +1057,30 @@ archive_read_format_rar_read_header(stru
       /* Skim the entire header and compute the CRC. */
       crc32_val = 0;
       while (skip > 0) {
-             size_t to_read = skip;
-             if (to_read > 32 * 1024)
-                     to_read = 32 * 1024;
-             if ((h = __archive_read_ahead(a, to_read, NULL)) == NULL) {
-                     archive_set_error(&a->archive,  ARCHIVE_ERRNO_FILE_FORMAT,
-                         "Bad RAR file");
-                     return (ARCHIVE_FATAL);
-             }
-             p = h;
-             crc32_val = crc32(crc32_val, (const unsigned char *)p, (unsigned int)to_read);
-             __archive_read_consume(a, to_read);
-             skip -= to_read;
+        unsigned to_read;
+        if (skip > 32 * 1024)
+          to_read = 32 * 1024;
+        else
+          to_read = (unsigned)skip;
+        if ((h = __archive_read_ahead(a, to_read, NULL)) == NULL) {
+          archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+            "Bad RAR file");
+          return (ARCHIVE_FATAL);
+        }
+        p = h;
+        crc32_val = crc32(crc32_val, (const unsigned char *)p, to_read);
+        __archive_read_consume(a, to_read);
+        skip -= to_read;
       }
       if ((crc32_val & 0xffff) != crc32_expected) {
 #ifndef DONT_FAIL_ON_CRC_ERROR
-             archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
-                 "Header CRC error");
-             return (ARCHIVE_FATAL);
+        archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+          "Header CRC error");
+        return (ARCHIVE_FATAL);
 #endif
       }
       if (head_type == ENDARC_HEAD)
-             return (ARCHIVE_EOF);
+        return (ARCHIVE_EOF);
       break;
 
     case NEWSUB_HEAD:
@@ -1083,7 +1089,7 @@ archive_read_format_rar_read_header(stru
       break;
 
     default:
-      archive_set_error(&a->archive,  ARCHIVE_ERRNO_FILE_FORMAT,
+      archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
                         "Bad RAR file");
       return (ARCHIVE_FATAL);
     }
@@ -1098,7 +1104,7 @@ archive_read_format_rar_read_data(struct
   int ret;
 
   if (rar->has_encrypted_entries == ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW) {
-         rar->has_encrypted_entries = 0;
+    rar->has_encrypted_entries = 0;
   }
 
   if (rar->bytes_unconsumed > 0) {
@@ -1186,7 +1192,7 @@ archive_read_format_rar_seek_data(struct
     int whence)
 {
   int64_t client_offset, ret;
-  unsigned int i;
+  size_t i;
   struct rar *rar = (struct rar *)(a->format->data);
 
   if (rar->compression_method == COMPRESS_METHOD_STORE)
@@ -1433,7 +1439,11 @@ read_header(struct archive_read *a, stru
   }
 
   if ((h = __archive_read_ahead(a, (size_t)header_size - 7, NULL)) == NULL)
+  {
+    archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                      "Failed to read full header content.");
     return (ARCHIVE_FATAL);
+  }
 
   /* File Header CRC check. */
   crc32_computed = crc32(crc32_computed, h, (unsigned)(header_size - 7));
@@ -1460,8 +1470,8 @@ read_header(struct archive_read *a, stru
 
   if (rar->file_flags & FHD_PASSWORD)
   {
-       archive_entry_set_is_data_encrypted(entry, 1);
-       rar->has_encrypted_entries = 1;
+    archive_entry_set_is_data_encrypted(entry, 1);
+    rar->has_encrypted_entries = 1;
     archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
                       "RAR encryption support unavailable.");
     /* Since it is only the data part itself that is encrypted we can at least
@@ -1506,10 +1516,23 @@ read_header(struct archive_read *a, stru
    */
   if (head_type == NEWSUB_HEAD) {
     size_t distance = p - (const char *)h;
+    if (rar->packed_size > INT64_MAX - header_size) {
+      archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                        "Extended header size too large.");
+      return (ARCHIVE_FATAL);
+    }
     header_size += rar->packed_size;
+    if ((uintmax_t)header_size > SIZE_MAX) {
+      archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                        "Unable to read extended header data.");
+      return (ARCHIVE_FATAL);
+    }
     /* Make sure we have the extended data. */
-    if ((h = __archive_read_ahead(a, (size_t)header_size - 7, NULL)) == NULL)
-        return (ARCHIVE_FATAL);
+    if ((h = __archive_read_ahead(a, (size_t)header_size - 7, NULL)) == NULL) {
+      archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                        "Failed to read extended header data.");
+      return (ARCHIVE_FATAL);
+    }
     p = h;
     endp = p + header_size - 7;
     p += distance;
@@ -1670,6 +1693,8 @@ read_header(struct archive_read *a, stru
     !memcmp(rar->filename, rar->filename_save, filename_size + 1))
   {
     __archive_read_consume(a, header_size - 7);
+    rar->br.avail_in = 0;
+    rar->br.next_in = NULL;
     rar->cursor++;
     if (rar->cursor >= rar->nodes)
     {
@@ -1689,6 +1714,12 @@ read_header(struct archive_read *a, stru
     }
     if (rar->dbo[rar->cursor].start_offset < 0)
     {
+      if (rar->packed_size > INT64_MAX - a->filter->position)
+      {
+        archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                          "Unable to store offsets.");
+        return (ARCHIVE_FATAL);
+      }
       rar->dbo[rar->cursor].start_offset = a->filter->position;
       rar->dbo[rar->cursor].end_offset = rar->dbo[rar->cursor].start_offset +
         rar->packed_size;
@@ -1745,6 +1776,11 @@ read_header(struct archive_read *a, stru
   }
 
   __archive_read_consume(a, header_size - 7);
+  if (rar->packed_size > INT64_MAX - a->filter->position) {
+    archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                      "Unable to store offsets.");
+    return (ARCHIVE_FATAL);
+  }
   rar->dbo[0].start_offset = a->filter->position;
   rar->dbo[0].end_offset = rar->dbo[0].start_offset + rar->packed_size;
 
@@ -1753,7 +1789,7 @@ read_header(struct archive_read *a, stru
   case OS_MSDOS:
   case OS_OS2:
   case OS_WIN32:
-    rar->mode = archive_le32dec(file_header.file_attr);
+    rar->mode = (__LA_MODE_T)archive_le32dec(file_header.file_attr);
     if (rar->mode & FILE_ATTRIBUTE_DIRECTORY)
       rar->mode = AE_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH;
     else
@@ -1764,7 +1800,7 @@ read_header(struct archive_read *a, stru
   case OS_UNIX:
   case OS_MAC_OS:
   case OS_BEOS:
-    rar->mode = archive_le32dec(file_header.file_attr);
+    rar->mode = (__LA_MODE_T)archive_le32dec(file_header.file_attr);
     break;
 
   default:
@@ -1780,6 +1816,7 @@ read_header(struct archive_read *a, stru
   rar->offset_outgoing = 0;
   rar->br.cache_avail = 0;
   rar->br.avail_in = 0;
+  rar->br.next_in = NULL;
   rar->crc_calculated = 0;
   rar->entry_eof = 0;
   rar->valid = 1;
@@ -1941,8 +1978,18 @@ read_symlink_stored(struct archive_read 
   int ret = (ARCHIVE_OK);
 
   rar = (struct rar *)(a->format->data);
+  if ((uintmax_t)rar->packed_size > SIZE_MAX)
+  {
+    archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                      "Unable to read link.");
+    return (ARCHIVE_FATAL);
+  }
   if ((h = rar_read_ahead(a, (size_t)rar->packed_size, NULL)) == NULL)
+  {
+    archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+                      "Failed to read link.");
     return (ARCHIVE_FATAL);
+  }
   p = h;
 
   if (archive_entry_copy_symlink_l(entry,
@@ -2224,7 +2271,7 @@ read_data_compressed(struct archive_read
 
       ret = expand(a, &end);
       if (ret != ARCHIVE_OK)
-             return (ret);
+        return (ret);
 
       rar->bytes_uncopied = end - start;
       rar->filters.lastend = end;
@@ -2332,9 +2379,9 @@ parse_codes(struct archive_read *a)
       __archive_ppmd7_functions.Ppmd7_Construct(&rar->ppmd7_context);
 
       if (rar->dictionary_size == 0) {
-             archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+        archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
                           "Invalid zero dictionary size");
-             return (ARCHIVE_FATAL);
+        return (ARCHIVE_FATAL);
       }
 
       if (!__archive_ppmd7_functions.Ppmd7_Alloc(&rar->ppmd7_context,
@@ -2929,11 +2976,11 @@ expand(struct archive_read *a, int64_t *
     }
 
     if ((symbol = read_next_symbol(a, &rar->maincode)) < 0)
-      return (ARCHIVE_FATAL);
+      goto bad_data;
 
     if (symbol < 256)
     {
-      lzss_emit_literal(rar, symbol);
+      lzss_emit_literal(rar, (uint8_t)symbol);
       continue;
     }
     else if (symbol == 256)
@@ -2956,14 +3003,14 @@ expand(struct archive_read *a, int64_t *
       else
       {
         if (parse_codes(a) != ARCHIVE_OK)
-          return (ARCHIVE_FATAL);
+          goto bad_data;
         continue;
       }
     }
     else if(symbol==257)
     {
       if (!read_filter(a, end))
-          return (ARCHIVE_FATAL);
+          goto bad_data;
       continue;
     }
     else if(symbol==258)
@@ -3048,7 +3095,7 @@ expand(struct archive_read *a, int64_t *
           {
             if ((lowoffsetsymbol =
               read_next_symbol(a, &rar->lowoffsetcode)) < 0)
-              return (ARCHIVE_FATAL);
+              goto bad_data;
             if(lowoffsetsymbol == 16)
             {
               rar->numlowoffsetrepeats = 15;
@@ -3096,7 +3143,7 @@ bad_data:
 }
 
 static int
-copy_from_lzss_window(struct archive_read *a, void *buffer,
+copy_from_lzss_window(struct archive_read *a, uint8_t *buffer,
                       int64_t startpos, int length)
 {
   int windowoffs, firstpart;
@@ -3111,7 +3158,7 @@ copy_from_lzss_window(struct archive_rea
   }
   if (firstpart < length) {
     memcpy(buffer, &rar->lzss.window[windowoffs], firstpart);
-    memcpy(buffer, &rar->lzss.window[0], length - firstpart);
+    memcpy(buffer + firstpart, &rar->lzss.window[0], length - firstpart);
   } else {
     memcpy(buffer, &rar->lzss.window[windowoffs], length);
   }
@@ -3180,8 +3227,12 @@ static const void *
 rar_read_ahead(struct archive_read *a, size_t min, ssize_t *avail)
 {
   struct rar *rar = (struct rar *)(a->format->data);
-  const void *h = __archive_read_ahead(a, min, avail);
+  const void *h;
   int ret;
+
+again:
+  h = __archive_read_ahead(a, min, avail);
+
   if (avail)
   {
     if (a->archive.read_data_is_posix_read && *avail > (ssize_t)a->archive.read_data_requested)
@@ -3203,7 +3254,7 @@ rar_read_ahead(struct archive_read *a, s
       rar->filename_must_match = 0;
       if (ret != (ARCHIVE_OK))
         return NULL;
-      return rar_read_ahead(a, min, avail);
+      goto again;
     }
   }
   return h;
@@ -3266,6 +3317,9 @@ parse_filter(struct archive_read *a, con
   else
     blocklength = prog ? prog->oldfilterlength : 0;
 
+  if (blocklength > rar->dictionary_size)
+    return 0;
+
   registers[3] = PROGRAM_SYSTEM_GLOBAL_ADDRESS;
   registers[4] = blocklength;
   registers[5] = prog ? prog->usagecount : 0;
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c:1.13 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c:1.14
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c:1.13 Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_xar.c      Wed May 21 15:25:51 2025
@@ -36,6 +36,10 @@
 #include <bsdxml.h>
 #elif HAVE_EXPAT_H
 #include <expat.h>
+#elif HAVE_XMLLITE_H
+#include <objidl.h>
+#include <initguid.h>
+#include <xmllite.h>
 #endif
 #ifdef HAVE_BZLIB_H
 #include <bzlib.h>
@@ -56,12 +60,13 @@
 #include "archive_read_private.h"
 
 #if (!defined(HAVE_LIBXML_XMLREADER_H) && \
-     !defined(HAVE_BSDXML_H) && !defined(HAVE_EXPAT_H)) ||\
+     !defined(HAVE_BSDXML_H) && !defined(HAVE_EXPAT_H) && \
+     !defined(HAVE_XMLLITE_H)) ||\
        !defined(HAVE_ZLIB_H) || \
        !defined(ARCHIVE_HAS_MD5) || !defined(ARCHIVE_HAS_SHA1)
 /*
  * xar needs several external libraries.
- *   o libxml2 or expat --- XML parser
+ *   o libxml2, expat or (Windows only) xmllite --- XML parser
  *   o openssl or MD5/SHA1 hash function
  *   o zlib
  *   o bzlib2 (option)
@@ -438,6 +443,8 @@ static void expat_start_cb(void *, const
 static void    expat_end_cb(void *, const XML_Char *);
 static void    expat_data_cb(void *, const XML_Char *, int);
 static int     expat_read_toc(struct archive_read *);
+#elif defined(HAVE_XMLLITE_H)
+static int     xmllite_read_toc(struct archive_read *);
 #endif
 
 int
@@ -589,6 +596,8 @@ read_toc(struct archive_read *a)
        r = xml2_read_toc(a);
 #elif defined(HAVE_BSDXML_H) || defined(HAVE_EXPAT_H)
        r = expat_read_toc(a);
+#elif defined(HAVE_XMLLITE_H)
+       r = xmllite_read_toc(a);
 #endif
        if (r != ARCHIVE_OK)
                return (r);
@@ -1110,17 +1119,17 @@ atohex(unsigned char *b, size_t bsize, c
        while (bsize && psize > 1) {
                unsigned char x;
 
-               if (p[0] >= 'a' && p[0] <= 'z')
+               if (p[0] >= 'a' && p[0] <= 'f')
                        x = (p[0] - 'a' + 0x0a) << 4;
-               else if (p[0] >= 'A' && p[0] <= 'Z')
+               else if (p[0] >= 'A' && p[0] <= 'F')
                        x = (p[0] - 'A' + 0x0a) << 4;
                else if (p[0] >= '0' && p[0] <= '9')
                        x = (p[0] - '0') << 4;
                else
                        return (-1);
-               if (p[1] >= 'a' && p[1] <= 'z')
+               if (p[1] >= 'a' && p[1] <= 'f')
                        x |= p[1] - 'a' + 0x0a;
-               else if (p[1] >= 'A' && p[1] <= 'Z')
+               else if (p[1] >= 'A' && p[1] <= 'F')
                        x |= p[1] - 'A' + 0x0a;
                else if (p[1] >= '0' && p[1] <= '9')
                        x |= p[1] - '0';
@@ -3333,6 +3342,326 @@ expat_read_toc(struct archive_read *a)
        XML_ParserFree(parser);
        return (ud.state);
 }
-#endif /* defined(HAVE_BSDXML_H) || defined(HAVE_EXPAT_H) */
+
+#elif defined(HAVE_XMLLITE_H)
+
+struct ArchiveStreamAdapter {
+       const ISequentialStreamVtbl *lpVtbl; /* see asaStaticVtable */
+       struct archive_read *a;
+};
+
+static HRESULT STDMETHODCALLTYPE
+asaQueryInterface(ISequentialStream *this, REFIID riid, void **ppv)
+{
+       if (!IsEqualIID(riid, &IID_ISequentialStream)) {
+               *ppv = NULL;
+               return E_NOINTERFACE;
+       }
+       *ppv = this;
+       return S_OK;
+}
+
+/*
+ * We can dispense with reference counting as we tightly manage the lifetime
+ * of an ArchiveStreamAdapter.
+ */
+static ULONG STDMETHODCALLTYPE
+asaAddRef(ISequentialStream *this)
+{
+       (void)this; /* UNUSED */
+       return ULONG_MAX;
+}
+
+static ULONG STDMETHODCALLTYPE
+asaRelease(ISequentialStream *this)
+{
+       (void)this; /* UNUSED */
+       return ULONG_MAX;
+}
+
+static HRESULT STDMETHODCALLTYPE
+asaRead(ISequentialStream *this, void *pv, ULONG cb, ULONG *pcbRead)
+{
+       struct ArchiveStreamAdapter *asa = (struct ArchiveStreamAdapter *)this;
+       struct archive_read *a;
+       struct xar *xar;
+       const void *d = pv;
+       size_t outbytes = cb;
+       size_t used = 0;
+       int r;
+
+       a = asa->a;
+       xar = (struct xar *)(a->format->data);
+
+       *pcbRead = 0;
+
+       if (xar->toc_remaining <= 0)
+               return cb != 0 ? S_FALSE : S_OK;
+
+       r = rd_contents(a, &d, &outbytes, &used, xar->toc_remaining);
+       if (r != ARCHIVE_OK)
+               return E_FAIL;
+       __archive_read_consume(a, used);
+       xar->toc_remaining -= used;
+       xar->offset += used;
+       xar->toc_total += outbytes;
+       PRINT_TOC(pv, outbytes);
+
+       *pcbRead = (ULONG)outbytes;
+       return outbytes < cb ? S_FALSE : S_OK;
+}
+
+static HRESULT STDMETHODCALLTYPE
+asaWrite(ISequentialStream *this, const void *pv, ULONG cb, ULONG *pcbWritten)
+{
+       (void)this; /* UNUSED */
+       (void)pv; /* UNUSED */
+       (void)cb; /* UNUSED */
+       if (!pcbWritten) return E_INVALIDARG;
+       *pcbWritten = 0;
+       return E_NOTIMPL;
+}
+
+static const ISequentialStreamVtbl asaStaticVtable = {
+       .QueryInterface = asaQueryInterface,
+       .AddRef = asaAddRef,
+       .Release = asaRelease,
+       .Read = asaRead,
+       .Write = asaWrite,
+};
+
+static int
+xmllite_create_stream_adapter(struct archive_read *a,
+    struct ArchiveStreamAdapter **pasa)
+{
+       struct ArchiveStreamAdapter *asa =
+           calloc(1, sizeof(struct ArchiveStreamAdapter));
+       if (!asa) {
+               archive_set_error(&(a->archive), ENOMEM, "Out of memory");
+               return (ARCHIVE_FATAL);
+       }
+       asa->lpVtbl = &asaStaticVtable;
+       asa->a = a;
+       *pasa = asa;
+       return (ARCHIVE_OK);
+}
+
+typedef HRESULT(STDMETHODCALLTYPE *xmllite_wstr_func)(IXmlReader *, LPCWSTR *,
+    UINT *);
+
+/*
+ * Returns an narrow-char archive_string in *as after calling
+ * the wide-char COM API callee() on the XmlReader reader.
+ * Sets an appropriate error on the archive if it fails.
+ */
+static int
+xmllite_call_return_as(struct archive_read *a, struct archive_string *as,
+    IXmlReader *reader, xmllite_wstr_func callee)
+{
+       LPCWSTR wcs;
+       UINT wlen;
+
+       if (FAILED(callee(reader, &wcs, &wlen))) {
+               archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                   "Failed to read XML data");
+               return (ARCHIVE_FATAL);
+       }
+
+       archive_string_init(as);
+       if (archive_string_append_from_wcs(as, wcs, (size_t)wlen) < 0) {
+               archive_string_free(as);
+               archive_set_error(&(a->archive), ENOMEM, "Out of memory");
+               return (ARCHIVE_FATAL);
+       }
+
+       return (ARCHIVE_OK);
+}
+
+static char *
+xmllite_call_return_mbs(struct archive_read *a, IXmlReader *reader,
+    xmllite_wstr_func callee)
+{
+       char *ret;
+       struct archive_string as;
+
+       if (xmllite_call_return_as(a, &as, reader, callee) < 0) {
+               return NULL;
+       }
+
+       ret = strdup(as.s);
+       archive_string_free(&as);
+       if (ret == NULL) {
+               archive_set_error(&(a->archive), ENOMEM, "Out of memory");
+               return NULL;
+       }
+       return ret;
+}
+
+static int
+xmllite_xmlattr_setup(struct archive_read *a,
+    struct xmlattr_list *list, IXmlReader *reader)
+{
+       struct xmlattr *attr;
+       HRESULT hr;
+
+       list->first = NULL;
+       list->last = &(list->first);
+       hr = reader->lpVtbl->MoveToFirstAttribute(reader);
+       /* Contrary to other checks, we're not using SUCCEEDED/FAILED
+        * because MoveToNextAttribute returns *S_FALSE* (success!)
+        * when it runs out of attributes.
+        */
+       while (hr == S_OK) {
+               /* Attributes implied as being default by the DTD are ignored */
+               if (reader->lpVtbl->IsDefault(reader))
+                       continue;
+
+               attr = malloc(sizeof*(attr));
+               if (attr == NULL) {
+                       archive_set_error(&(a->archive), ENOMEM,
+                           "Out of memory");
+                       return (ARCHIVE_FATAL);
+               }
+
+               attr->name = xmllite_call_return_mbs(a, reader,
+                   reader->lpVtbl->GetLocalName);
+               if (attr->name == NULL) {
+                       free(attr);
+                       /* xmllite_call_return_mbs sets an appropriate error */
+                       return (ARCHIVE_FATAL);
+               }
+
+               attr->value = xmllite_call_return_mbs(a, reader,
+                   reader->lpVtbl->GetValue);
+               if (attr->value == NULL) {
+                       free(attr->name);
+                       free(attr);
+                       /* xmllite_call_return_mbs sets an appropriate error */
+                       return (ARCHIVE_FATAL);
+               }
+
+               attr->next = NULL;
+               *list->last = attr;
+               list->last = &(attr->next);
+               hr = reader->lpVtbl->MoveToNextAttribute(reader);
+       }
+
+       if (FAILED(hr)) {
+               archive_set_error(&(a->archive), ARCHIVE_ERRNO_FILE_FORMAT,
+                   "Failed to parse XML document");
+               return (ARCHIVE_FAILED);
+       }
+
+       return (ARCHIVE_OK);
+}
+
+static int
+xmllite_read_toc(struct archive_read *a)
+{
+       struct ArchiveStreamAdapter *asa = NULL;
+       char *name;
+       struct archive_string as;
+       BOOL empty;
+       XmlNodeType type;
+       struct xmlattr_list list;
+       IXmlReader *reader = NULL;
+       int r = ARCHIVE_OK;
+
+       if ((r = xmllite_create_stream_adapter(a, &asa)) < 0) {
+               goto out;
+       }
+
+       if (FAILED(CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL))) {
+               r = ARCHIVE_FATAL;
+               goto out;
+       }
+
+       if (FAILED(reader->lpVtbl->SetInput(reader, (IUnknown *)asa))) {
+               archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                   "Failed to prepare XML stream");
+               r = ARCHIVE_FATAL;
+               goto out;
+       }
+
+       while (!reader->lpVtbl->IsEOF(reader)) {
+               if (FAILED(reader->lpVtbl->Read(reader, &type))) {
+                       archive_set_error(&(a->archive), ARCHIVE_ERRNO_MISC,
+                           "Failed to read XML stream");
+                       r = ARCHIVE_FATAL;
+                       goto out;
+               }
+
+               switch (type) {
+               case XmlNodeType_Element:
+                       empty = reader->lpVtbl->IsEmptyElement(reader);
+
+                       name = xmllite_call_return_mbs(a, reader,
+                           reader->lpVtbl->GetLocalName);
+                       if (name == NULL) {
+                               /* xmllite_call_return_mbs sets an appropriate error */
+                               r = ARCHIVE_FATAL;
+                               goto out;
+                       }
+
+                       r = xmllite_xmlattr_setup(a, &list, reader);
+                       if (r == ARCHIVE_OK) {
+                               r = xml_start(a, name, &list);
+                       }
+                       xmlattr_cleanup(&list);
+                       if (r == ARCHIVE_OK && empty) {
+                               xml_end(a, name);
+                       }
+
+                       free(name);
+                       if (r != ARCHIVE_OK) {
+                               goto out;
+                       }
+
+                       break;
+               case XmlNodeType_EndElement:
+                       name = xmllite_call_return_mbs(a, reader,
+                           reader->lpVtbl->GetLocalName);
+                       if (name == NULL) {
+                               /* xmllite_call_return_mbs sets an appropriate error */
+                               r = ARCHIVE_FATAL;
+                               goto out;
+                       }
+
+                       xml_end(a, name);
+                       free(name);
+                       break;
+               case XmlNodeType_Text:
+                       r = xmllite_call_return_as(a, &as, reader,
+                           reader->lpVtbl->GetValue);
+                       if (r != ARCHIVE_OK) {
+                               /* xmllite_call_return_as sets an appropriate error */
+                               goto out;
+                       }
+
+                       xml_data(a, as.s, (int)archive_strlen(&as));
+                       archive_string_free(&as);
+
+               case XmlNodeType_None:
+               case XmlNodeType_Attribute:
+               case XmlNodeType_CDATA:
+               case XmlNodeType_ProcessingInstruction:
+               case XmlNodeType_Comment:
+               case XmlNodeType_DocumentType:
+               case XmlNodeType_Whitespace:
+               case XmlNodeType_XmlDeclaration:
+               default:
+                       break;
+               }
+       }
+
+out:
+       if (reader)
+               reader->lpVtbl->Release(reader);
+
+       free(asa);
+
+       return r;
+}
+#endif /* defined(XMLLITE) */
 
 #endif /* Support xar format */

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c:1.17 pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c:1.18
--- pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c:1.17 Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_read_support_format_zip.c      Wed May 21 15:25:51 2025
@@ -71,6 +71,7 @@
 #include "archive_private.h"
 #include "archive_rb.h"
 #include "archive_read_private.h"
+#include "archive_time_private.h"
 #include "archive_ppmd8_private.h"
 
 #ifndef HAVE_ZLIB_H
@@ -465,27 +466,6 @@ compression_name(const int compression)
        return "??";
 }
 
-/* Convert an MSDOS-style date/time into Unix-style time. */
-static time_t
-zip_time(const char *p)
-{
-       int msTime, msDate;
-       struct tm ts;
-
-       msTime = (0xff & (unsigned)p[0]) + 256 * (0xff & (unsigned)p[1]);
-       msDate = (0xff & (unsigned)p[2]) + 256 * (0xff & (unsigned)p[3]);
-
-       memset(&ts, 0, sizeof(ts));
-       ts.tm_year = ((msDate >> 9) & 0x7f) + 80; /* Years since 1900. */
-       ts.tm_mon = ((msDate >> 5) & 0x0f) - 1; /* Month number. */
-       ts.tm_mday = msDate & 0x1f; /* Day of month. */
-       ts.tm_hour = (msTime >> 11) & 0x1f;
-       ts.tm_min = (msTime >> 5) & 0x3f;
-       ts.tm_sec = (msTime << 1) & 0x3e;
-       ts.tm_isdst = -1;
-       return mktime(&ts);
-}
-
 /*
  * The extra data is stored as a list of
  *     id1+size1+data1 + id2+size2+data2 ...
@@ -978,7 +958,7 @@ zip_read_local_file_header(struct archiv
        }
        zip->init_decryption = (zip_entry->zip_flags & ZIP_ENCRYPTED);
        zip_entry->compression = (char)archive_le16dec(p + 8);
-       zip_entry->mtime = zip_time(p + 10);
+       zip_entry->mtime = dos_to_unix(archive_le32dec(p + 10));
        zip_entry->crc32 = archive_le32dec(p + 14);
        if (zip_entry->zip_flags & ZIP_LENGTH_AT_END)
                zip_entry->decdat = p[11];
@@ -3986,7 +3966,7 @@ slurp_central_directory(struct archive_r
                        zip->has_encrypted_entries = 1;
                }
                zip_entry->compression = (char)archive_le16dec(p + 10);
-               zip_entry->mtime = zip_time(p + 12);
+               zip_entry->mtime = dos_to_unix(archive_le32dec(p + 12));
                zip_entry->crc32 = archive_le32dec(p + 16);
                if (zip_entry->zip_flags & ZIP_LENGTH_AT_END)
                        zip_entry->decdat = p[13];

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_string.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_string.c:1.14 pkgsrc/archivers/libarchive/files/libarchive/archive_string.c:1.15
--- pkgsrc/archivers/libarchive/files/libarchive/archive_string.c:1.14  Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_string.c       Wed May 21 15:25:51 2025
@@ -472,7 +472,8 @@ static int
 archive_wstring_append_from_mbs_in_codepage(struct archive_wstring *dest,
     const char *s, size_t length, struct archive_string_conv *sc)
 {
-       int count, ret = 0;
+       int ret = 0;
+       size_t count;
        UINT from_cp;
 
        if (sc != NULL)
@@ -494,7 +495,7 @@ archive_wstring_append_from_mbs_in_codep
                ws = dest->s + dest->length;
                mp = (const unsigned char *)s;
                count = 0;
-               while (count < (int)length && *mp) {
+               while (count < length && *mp) {
                        *ws++ = (wchar_t)*mp++;
                        count++;
                }
@@ -517,13 +518,13 @@ archive_wstring_append_from_mbs_in_codep
                         *  UTF-16BE/LE NFD ===> UTF-16 NFC
                         *  UTF-16BE/LE NFC ===> UTF-16 NFD
                         */
-                       count = (int)utf16nbytes(s, length);
+                       count = utf16nbytes(s, length);
                } else {
                        /*
                         *  UTF-8 NFD ===> UTF-16 NFC
                         *  UTF-8 NFC ===> UTF-16 NFD
                         */
-                       count = (int)mbsnbytes(s, length);
+                       count = mbsnbytes(s, length);
                }
                u16.s = (char *)dest->s;
                u16.length = dest->length << 1;
@@ -538,7 +539,7 @@ archive_wstring_append_from_mbs_in_codep
                sc->flag = saved_flag;/* restore the saved flag. */
                return (ret);
        } else if (sc != NULL && (sc->flag & SCONV_FROM_UTF16)) {
-               count = (int)utf16nbytes(s, length);
+               count = utf16nbytes(s, length);
                count >>= 1; /* to be WCS length */
                /* Allocate memory for WCS. */
                if (NULL == archive_wstring_ensure(dest,
@@ -547,14 +548,14 @@ archive_wstring_append_from_mbs_in_codep
                wmemcpy(dest->s + dest->length, (const wchar_t *)s, count);
                if ((sc->flag & SCONV_FROM_UTF16BE) && !IS_BIG_ENDIAN) {
                        uint16_t *u16 = (uint16_t *)(dest->s + dest->length);
-                       int b;
+                       size_t b;
                        for (b = 0; b < count; b++) {
                                uint16_t val = archive_le16dec(u16+b);
                                archive_be16enc(u16+b, val);
                        }
                } else if ((sc->flag & SCONV_FROM_UTF16LE) && IS_BIG_ENDIAN) {
                        uint16_t *u16 = (uint16_t *)(dest->s + dest->length);
-                       int b;
+                       size_t b;
                        for (b = 0; b < count; b++) {
                                uint16_t val = archive_be16dec(u16+b);
                                archive_le16enc(u16+b, val);
@@ -578,21 +579,28 @@ archive_wstring_append_from_mbs_in_codep
 
                buffsize = dest->length + length + 1;
                do {
+                       int r;
+
+                       /* MultiByteToWideChar is limited to int. */
+                       if (length > (size_t)INT_MAX ||
+                               (dest->buffer_length >> 1) > (size_t)INT_MAX)
+                               return (-1);
                        /* Allocate memory for WCS. */
                        if (NULL == archive_wstring_ensure(dest, buffsize))
                                return (-1);
                        /* Convert MBS to WCS. */
-                       count = MultiByteToWideChar(from_cp,
+                       r = MultiByteToWideChar(from_cp,
                            mbflag, s, (int)length, dest->s + dest->length,
                            (int)(dest->buffer_length >> 1) -1);
-                       if (count == 0 &&
+                       if (r == 0 &&
                            GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
                                /* Expand the WCS buffer. */
                                buffsize = dest->buffer_length << 1;
                                continue;
                        }
-                       if (count == 0 && length != 0)
+                       if (r == 0 && length != 0)
                                ret = -1;
+                       count = (size_t)r;
                        break;
                } while (1);
        }
@@ -701,9 +709,9 @@ archive_string_append_from_wcs_in_codepa
     const wchar_t *ws, size_t len, struct archive_string_conv *sc)
 {
        BOOL defchar_used, *dp;
-       int count, ret = 0;
+       int ret = 0;
        UINT to_cp;
-       int wslen = (int)len;
+       size_t count, wslen = len;
 
        if (sc != NULL)
                to_cp = sc->to_cp;
@@ -742,13 +750,13 @@ archive_string_append_from_wcs_in_codepa
                count = 0;
                defchar_used = 0;
                if (sc->flag & SCONV_TO_UTF16BE) {
-                       while (count < (int)len && *ws) {
+                       while (count < len && *ws) {
                                archive_be16enc(u16+count, *ws);
                                ws++;
                                count++;
                        }
                } else {
-                       while (count < (int)len && *ws) {
+                       while (count < len && *ws) {
                                archive_le16enc(u16+count, *ws);
                                ws++;
                                count++;
@@ -761,15 +769,21 @@ archive_string_append_from_wcs_in_codepa
                    archive_string_ensure(as, as->length + len * 2 + 1))
                        return (-1);
                do {
+                       int r;
+
                        defchar_used = 0;
                        if (to_cp == CP_UTF8 || sc == NULL)
                                dp = NULL;
                        else
                                dp = &defchar_used;
-                       count = WideCharToMultiByte(to_cp, 0, ws, wslen,
+                       /* WideCharToMultiByte is limited to int. */
+                       if (as->buffer_length - as->length - 1 > (size_t)INT_MAX ||
+                               wslen > (size_t)INT_MAX)
+                               return (-1);
+                       r = WideCharToMultiByte(to_cp, 0, ws, (int)wslen,
                            as->s + as->length,
-                           (int)as->buffer_length - (int)as->length - 1, NULL, dp);
-                       if (count == 0 &&
+                           (int)(as->buffer_length - as->length - 1), NULL, dp);
+                       if (r == 0 &&
                            GetLastError() == ERROR_INSUFFICIENT_BUFFER) {
                                /* Expand the MBS buffer and retry. */
                                if (NULL == archive_string_ensure(as,
@@ -777,8 +791,9 @@ archive_string_append_from_wcs_in_codepa
                                        return (-1);
                                continue;
                        }
-                       if (count == 0)
+                       if (r == 0)
                                ret = -1;
+                       count = (size_t)r;
                        break;
                } while (1);
        }
@@ -2054,7 +2069,7 @@ iconv_strncat_in_locale(struct archive_s
        char *outp;
        size_t avail, bs;
        int return_value = 0; /* success */
-       int to_size, from_size;
+       size_t to_size, from_size;
 
        if (sc->flag & SCONV_TO_UTF16)
                to_size = 2;
@@ -2073,7 +2088,7 @@ iconv_strncat_in_locale(struct archive_s
        remaining = length;
        outp = as->s + as->length;
        avail = as->buffer_length - as->length - to_size;
-       while (remaining >= (size_t)from_size) {
+       while (remaining >= from_size) {
                size_t result = iconv(cd, &itp, &remaining, &outp, &avail);
 
                if (result != (size_t)-1)
@@ -2196,6 +2211,8 @@ invalid_mbs(const void *_p, size_t n, st
        if (codepage != CP_UTF8)
                mbflag |= MB_PRECOMPOSED;
 
+       if (n > (size_t)INT_MAX)
+               return (-1); /* Invalid */
        if (MultiByteToWideChar(codepage, mbflag, p, (int)n, NULL, 0) == 0)
                return (-1); /* Invalid */
        return (0); /* Okay */
@@ -2349,7 +2366,7 @@ _utf8_to_unicode(uint32_t *pwc, const ch
        cnt = utf8_count[ch];
 
        /* Invalid sequence or there are not plenty bytes. */
-       if ((int)n < cnt) {
+       if (n < (size_t)cnt) {
                cnt = (int)n;
                for (i = 1; i < cnt; i++) {
                        if ((s[i] & 0xc0) != 0x80) {
@@ -2418,7 +2435,7 @@ _utf8_to_unicode(uint32_t *pwc, const ch
                        cnt = 6;
                else
                        cnt = 1;
-               if ((int)n < cnt)
+               if (n < (size_t)cnt)
                        cnt = (int)n;
                for (i = 1; i < cnt; i++) {
                        if ((s[i] & 0xc0) != 0x80) {
@@ -2634,7 +2651,7 @@ unicode_to_utf16be(char *p, size_t remai
        } else {
                if (remaining < 2)
                        return (0);
-               archive_be16enc(utf16, uc);
+               archive_be16enc(utf16, (uint16_t)uc);
                return (2);
        }
 }
@@ -2656,7 +2673,7 @@ unicode_to_utf16le(char *p, size_t remai
        } else {
                if (remaining < 2)
                        return (0);
-               archive_le16enc(utf16, uc);
+               archive_le16enc(utf16, (uint16_t)uc);
                return (2);
        }
 }
@@ -3521,10 +3538,9 @@ win_strncat_from_utf16(struct archive_st
 {
        struct archive_string tmp;
        const char *u16;
-       int ll;
        BOOL defchar;
        char *mbs;
-       size_t mbs_size, b;
+       size_t mbs_size, b, ll;
        int ret = 0;
 
        bytes &= ~1;
@@ -3588,18 +3604,24 @@ win_strncat_from_utf16(struct archive_st
        }
 
        do {
+               int r;
                defchar = 0;
-               ll = WideCharToMultiByte(sc->to_cp, 0,
+               /* WideCharToMultiByte is limited to int. */
+               if (bytes > (size_t)INT_MAX || mbs_size > (size_t)INT_MAX)
+                       return (-1);
+               r = WideCharToMultiByte(sc->to_cp, 0,
                    (LPCWSTR)u16, (int)bytes>>1, mbs, (int)mbs_size,
                        NULL, &defchar);
                /* Exit loop if we succeeded */
-               if (ll != 0 ||
+               if (r != 0 ||
                    GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
+                       ll = (size_t)r;
                        break;
                }
                /* Else expand buffer and loop to try again. */
-               ll = WideCharToMultiByte(sc->to_cp, 0,
+               r = WideCharToMultiByte(sc->to_cp, 0,
                    (LPCWSTR)u16, (int)bytes, NULL, 0, NULL, NULL);
+               ll = (size_t)r;
                if (archive_string_ensure(as, ll +1) == NULL)
                        return (-1);
                mbs = as->s + as->length;
@@ -3665,16 +3687,21 @@ win_strncat_to_utf16(struct archive_stri
                return (0);
        }
        do {
-               count = MultiByteToWideChar(sc->from_cp,
+               int r;
+               if (length > (size_t)INT_MAX || (avail >> 1) > (size_t)INT_MAX)
+                       return (-1);
+               r = MultiByteToWideChar(sc->from_cp,
                    MB_PRECOMPOSED, s, (int)length, (LPWSTR)u16, (int)avail>>1);
                /* Exit loop if we succeeded */
-               if (count != 0 ||
+               if (r != 0 ||
                    GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
+                       count = (size_t)r;
                        break;
                }
                /* Expand buffer and try again */
-               count = MultiByteToWideChar(sc->from_cp,
+               r = MultiByteToWideChar(sc->from_cp,
                    MB_PRECOMPOSED, s, (int)length, NULL, 0);
+               count = (size_t)r;
                if (archive_string_ensure(as16, (count +1) * 2)
                    == NULL)
                        return (-1);
@@ -3825,9 +3852,9 @@ best_effort_strncat_to_utf16(struct arch
                        ret = -1;
                }
                if (bigendian)
-                       archive_be16enc(utf16, c);
+                       archive_be16enc(utf16, (uint16_t)c);
                else
-                       archive_le16enc(utf16, c);
+                       archive_le16enc(utf16, (uint16_t)c);
                utf16 += 2;
        }
        as16->length = utf16 - as16->s;
Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c:1.14 pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c:1.15
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c:1.14    Sat Oct 19 05:39:59 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_set_format_pax.c Wed May 21 15:25:51 2025
@@ -1414,7 +1414,7 @@ archive_write_pax_header(struct archive_
                struct archive_entry *pax_attr_entry;
                time_t s;
                int64_t uid, gid;
-               int mode;
+               __LA_MODE_T mode;
 
                pax_attr_entry = archive_entry_new2(&a->archive);
                p = entry_name.s;
@@ -1571,7 +1571,7 @@ build_ustar_entry_name(char *dest, const
        const char *filename, *filename_end;
        char *p;
        int need_slash = 0; /* Was there a trailing slash? */
-       size_t suffix_length = 99;
+       size_t suffix_length = 98; /* 99 - 1 for trailing slash */
        size_t insert_length;
 
        /* Length of additional dir element to be added. */
@@ -1623,7 +1623,7 @@ build_ustar_entry_name(char *dest, const
        /* Step 2: Locate the "prefix" section of the dirname, including
         * trailing '/'. */
        prefix = src;
-       prefix_end = prefix + 155;
+       prefix_end = prefix + 154 /* 155 - 1 for trailing / */;
        if (prefix_end > filename)
                prefix_end = filename;
        while (prefix_end > prefix && *prefix_end != '/')

Index: pkgsrc/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c:1.6 pkgsrc/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c:1.7
--- pkgsrc/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c:1.6    Sat Oct 19 05:39:59 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/archive_write_add_filter_gzip.c        Wed May 21 15:25:51 2025
@@ -58,6 +58,7 @@ archive_write_set_compression_gzip(struc
 struct private_data {
        int              compression_level;
        int              timestamp;
+       char    *original_filename;
 #ifdef HAVE_ZLIB_H
        z_stream         stream;
        int64_t          total_in;
@@ -113,6 +114,8 @@ archive_write_add_filter_gzip(struct arc
        f->free = &archive_compressor_gzip_free;
        f->code = ARCHIVE_FILTER_GZIP;
        f->name = "gzip";
+
+       data->original_filename = NULL;
 #ifdef HAVE_ZLIB_H
        data->compression_level = Z_DEFAULT_COMPRESSION;
        return (ARCHIVE_OK);
@@ -140,6 +143,7 @@ archive_compressor_gzip_free(struct arch
 #else
        __archive_write_program_free(data->pdata);
 #endif
+       free((void*)data->original_filename);
        free(data);
        f->data = NULL;
        return (ARCHIVE_OK);
@@ -165,6 +169,13 @@ archive_compressor_gzip_options(struct a
                data->timestamp = (value == NULL)?-1:1;
                return (ARCHIVE_OK);
        }
+       if (strcmp(key, "original-filename") == 0) {
+               free((void*)data->original_filename);
+               data->original_filename = NULL;
+               if (value)
+                       data->original_filename = strdup(value);
+               return (ARCHIVE_OK);
+       }
 
        /* Note: The "warn" return is just to inform the options
         * supervisor that we didn't handle it.  It will generate
@@ -210,7 +221,7 @@ archive_compressor_gzip_open(struct arch
        data->compressed[0] = 0x1f; /* GZip signature bytes */
        data->compressed[1] = 0x8b;
        data->compressed[2] = 0x08; /* "Deflate" compression */
-       data->compressed[3] = 0; /* No options */
+       data->compressed[3] = data->original_filename == NULL ? 0 : 0x8;
        if (data->timestamp >= 0) {
                time_t t = time(NULL);
                data->compressed[4] = (uint8_t)(t)&0xff;  /* Timestamp */
@@ -229,6 +240,12 @@ archive_compressor_gzip_open(struct arch
        data->stream.next_out += 10;
        data->stream.avail_out -= 10;
 
+       if (data->original_filename != NULL) {
+               strcpy((char*)data->compressed + 10, data->original_filename);
+               data->stream.next_out += strlen(data->original_filename) + 1;
+               data->stream.avail_out -= strlen(data->original_filename) + 1;
+       }
+
        f->write = archive_compressor_gzip_write;
 
        /* Initialize compression library. */

Index: pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt:1.14 pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt:1.15
--- pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt:1.14       Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/test/CMakeLists.txt    Wed May 21 15:25:51 2025
@@ -21,10 +21,10 @@ IF(ENABLE_TEST)
     test_archive_clear_error.c
     test_archive_cmdline.c
     test_archive_digest.c
-    test_archive_getdate.c
     test_archive_match_owner.c
     test_archive_match_path.c
     test_archive_match_time.c
+    test_archive_parse_date.c
     test_archive_pathmatch.c
     test_archive_read.c
     test_archive_read_add_passphrase.c
@@ -133,6 +133,7 @@ IF(ENABLE_TEST)
     test_read_format_gtar_filename.c
     test_read_format_gtar_gz.c
     test_read_format_gtar_lzma.c
+    test_read_format_gtar_redundant_L.c
     test_read_format_gtar_sparse.c
     test_read_format_gtar_sparse_length.c
     test_read_format_gtar_sparse_skip_entry.c
@@ -163,6 +164,7 @@ IF(ENABLE_TEST)
     test_read_format_rar_encryption_partially.c
     test_read_format_rar_invalid1.c
     test_read_format_rar_filter.c
+    test_read_format_rar_overflow.c
     test_read_format_rar5.c
     test_read_format_raw.c
     test_read_format_tar.c
@@ -172,6 +174,7 @@ IF(ENABLE_TEST)
     test_read_format_tar_empty_pax.c
     test_read_format_tar_filename.c
     test_read_format_tar_invalid_pax_size.c
+    test_read_format_tar_pax_g_large.c
     test_read_format_tar_pax_large_attr.c
     test_read_format_tbz.c
     test_read_format_tgz.c
@@ -273,6 +276,7 @@ IF(ENABLE_TEST)
     test_write_format_mtree_classic_indent.c
     test_write_format_mtree_fflags.c
     test_write_format_mtree_no_separator.c
+    test_write_format_mtree_preset_digests.c
     test_write_format_mtree_quoted_filename.c
     test_write_format_pax.c
     test_write_format_raw.c
@@ -290,6 +294,9 @@ IF(ENABLE_TEST)
     test_write_format_zip.c
     test_write_format_zip64_stream.c
     test_write_format_zip_compression_store.c
+    test_write_format_zip_compression_bzip2.c
+    test_write_format_zip_compression_lzmaxz.c
+    test_write_format_zip_compression_zstd.c
     test_write_format_zip_empty.c
     test_write_format_zip_empty_zip64.c
     test_write_format_zip_entry_size_unset.c

Index: pkgsrc/archivers/libarchive/files/libarchive/test/list.h
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/list.h:1.16 pkgsrc/archivers/libarchive/files/libarchive/test/list.h:1.17
--- pkgsrc/archivers/libarchive/files/libarchive/test/list.h:1.16       Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/test/list.h    Wed May 21 15:25:51 2025
@@ -18,10 +18,10 @@ DEFINE_TEST(test_archive_sha1)
 DEFINE_TEST(test_archive_sha256)
 DEFINE_TEST(test_archive_sha384)
 DEFINE_TEST(test_archive_sha512)
-DEFINE_TEST(test_archive_getdate)
 DEFINE_TEST(test_archive_match_owner)
 DEFINE_TEST(test_archive_match_path)
 DEFINE_TEST(test_archive_match_time)
+DEFINE_TEST(test_archive_parse_date)
 DEFINE_TEST(test_archive_pathmatch)
 DEFINE_TEST(test_archive_read_ahead_eof)
 DEFINE_TEST(test_archive_read_add_passphrase)
@@ -222,10 +222,15 @@ DEFINE_TEST(test_read_format_7zip_ppmd)
 DEFINE_TEST(test_read_format_7zip_lzma2_arm64)
 DEFINE_TEST(test_read_format_7zip_deflate_arm64)
 DEFINE_TEST(test_read_format_7zip_win_attrib)
+DEFINE_TEST(test_read_format_7zip_sfx_pe)
+DEFINE_TEST(test_read_format_7zip_sfx_modified_pe)
+DEFINE_TEST(test_read_format_7zip_sfx_elf)
 DEFINE_TEST(test_read_format_7zip_extract_second)
+DEFINE_TEST(test_read_format_7zip_lzma2_riscv)
 DEFINE_TEST(test_read_format_7zip_lzma2_sparc)
 DEFINE_TEST(test_read_format_7zip_zstd_sparc)
 DEFINE_TEST(test_read_format_7zip_deflate_powerpc)
+DEFINE_TEST(test_read_format_7zip_lzma2_powerpc)
 DEFINE_TEST(test_read_format_7zip_encryption_data)
 DEFINE_TEST(test_read_format_7zip_encryption_header)
 DEFINE_TEST(test_read_format_7zip_encryption_partially)
@@ -278,6 +283,7 @@ DEFINE_TEST(test_read_format_gtar_filena
 DEFINE_TEST(test_read_format_gtar_filename_KOI8R_CP1251)
 DEFINE_TEST(test_read_format_gtar_gz)
 DEFINE_TEST(test_read_format_gtar_lzma)
+DEFINE_TEST(test_read_format_gtar_redundant_L)
 DEFINE_TEST(test_read_format_gtar_sparse)
 DEFINE_TEST(test_read_format_gtar_sparse_length)
 DEFINE_TEST(test_read_format_gtar_sparse_skip_entry)
@@ -330,8 +336,11 @@ DEFINE_TEST(test_read_format_rar_multivo
 DEFINE_TEST(test_read_format_rar_multivolume_seek_data)
 DEFINE_TEST(test_read_format_rar_multivolume_seek_multiple_files)
 DEFINE_TEST(test_read_format_rar_multivolume_uncompressed_files)
+DEFINE_TEST(test_read_format_rar_endarc_huge)
 DEFINE_TEST(test_read_format_rar_ppmd_use_after_free)
 DEFINE_TEST(test_read_format_rar_ppmd_use_after_free2)
+DEFINE_TEST(test_read_format_rar_newsub_huge)
+DEFINE_TEST(test_read_format_rar_symlink_huge)
 DEFINE_TEST(test_read_format_rar5_set_format)
 DEFINE_TEST(test_read_format_rar5_stored)
 DEFINE_TEST(test_read_format_rar5_compressed)
@@ -395,6 +404,7 @@ DEFINE_TEST(test_read_format_rar_encrypt
 DEFINE_TEST(test_read_format_rar_encryption_partially)
 DEFINE_TEST(test_read_format_rar_filter)
 DEFINE_TEST(test_read_format_rar_invalid1)
+DEFINE_TEST(test_read_format_rar_overflow)
 DEFINE_TEST(test_read_format_raw)
 DEFINE_TEST(test_read_format_tar)
 DEFINE_TEST(test_read_format_tar_concatenated)
@@ -403,6 +413,7 @@ DEFINE_TEST(test_read_format_tar_empty_p
 DEFINE_TEST(test_read_format_tar_empty_with_gnulabel)
 DEFINE_TEST(test_read_format_tar_filename)
 DEFINE_TEST(test_read_format_tar_invalid_pax_size)
+DEFINE_TEST(test_read_format_tar_pax_g_large)
 DEFINE_TEST(test_read_format_tar_pax_large_attr)
 DEFINE_TEST(test_read_format_tbz)
 DEFINE_TEST(test_read_format_tgz)
@@ -411,6 +422,7 @@ DEFINE_TEST(test_read_format_txz)
 DEFINE_TEST(test_read_format_tz)
 DEFINE_TEST(test_read_format_ustar_filename)
 DEFINE_TEST(test_read_format_warc)
+DEFINE_TEST(test_read_format_warc_incomplete)
 DEFINE_TEST(test_read_format_xar)
 DEFINE_TEST(test_read_format_xar_duplicate_filename_node)
 DEFINE_TEST(test_read_format_xar_doublelink)
@@ -569,6 +581,7 @@ DEFINE_TEST(test_write_format_7zip_basic
 DEFINE_TEST(test_write_format_7zip_basic_lzma1)
 DEFINE_TEST(test_write_format_7zip_basic_lzma2)
 DEFINE_TEST(test_write_format_7zip_basic_ppmd)
+DEFINE_TEST(test_write_format_7zip_basic_zstd)
 DEFINE_TEST(test_write_format_7zip_empty_archive)
 DEFINE_TEST(test_write_format_7zip_empty_files)
 DEFINE_TEST(test_write_format_7zip_large_bzip2)
@@ -577,6 +590,7 @@ DEFINE_TEST(test_write_format_7zip_large
 DEFINE_TEST(test_write_format_7zip_large_lzma1)
 DEFINE_TEST(test_write_format_7zip_large_lzma2)
 DEFINE_TEST(test_write_format_7zip_large_ppmd)
+DEFINE_TEST(test_write_format_7zip_large_zstd)
 DEFINE_TEST(test_write_format_ar)
 DEFINE_TEST(test_write_format_cpio)
 DEFINE_TEST(test_write_format_cpio_empty)
@@ -597,6 +611,27 @@ DEFINE_TEST(test_write_format_mtree_clas
 DEFINE_TEST(test_write_format_mtree_classic_indent)
 DEFINE_TEST(test_write_format_mtree_fflags)
 DEFINE_TEST(test_write_format_mtree_no_separator)
+DEFINE_TEST(test_write_format_mtree_digests_no_digests_set_no_data)
+DEFINE_TEST(test_write_format_mtree_digests_no_digests_set_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_no_digests_set_non_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_md5_digest_set_no_data)
+DEFINE_TEST(test_write_format_mtree_digests_md5_digest_set_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_md5_digest_set_non_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_rmd160_digest_set_no_data)
+DEFINE_TEST(test_write_format_mtree_digests_rmd160_digest_set_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_rmd160_digest_set_non_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha1_digest_set_no_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha1_digest_set_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha1_digest_set_non_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha256_digest_set_no_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha256_digest_set_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha256_digest_set_non_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha384_digest_set_no_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha384_digest_set_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha384_digest_set_non_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha512_digest_set_no_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha512_digest_set_empty_data)
+DEFINE_TEST(test_write_format_mtree_digests_sha512_digest_set_non_empty_data)
 DEFINE_TEST(test_write_format_mtree_quoted_filename)
 DEFINE_TEST(test_write_format_pax)
 DEFINE_TEST(test_write_format_raw)
@@ -617,7 +652,10 @@ DEFINE_TEST(test_write_format_zip_tradit
 DEFINE_TEST(test_write_format_zip_winzip_aes128_encryption)
 DEFINE_TEST(test_write_format_zip_winzip_aes256_encryption)
 DEFINE_TEST(test_write_format_zip64_stream)
+DEFINE_TEST(test_write_format_zip_compression_bzip2)
+DEFINE_TEST(test_write_format_zip_compression_lzmaxz)
 DEFINE_TEST(test_write_format_zip_compression_store)
+DEFINE_TEST(test_write_format_zip_compression_zstd)
 DEFINE_TEST(test_write_format_zip_empty)
 DEFINE_TEST(test_write_format_zip_empty_zip64)
 DEFINE_TEST(test_write_format_zip_size_unset)

Index: pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c:1.8 pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c:1.8    Fri Apr 12 15:39:53 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/read_open_memory.c        Wed May 21 15:25:51 2025
@@ -167,7 +167,7 @@ memory_read_skip(struct archive *a, void
 
        (void)a; /* UNUSED */
        /* We can't skip by more than is available. */
-       if ((off_t)skip > (off_t)(mine->end - mine->p))
+       if (skip > mine->end - mine->p)
                skip = mine->end - mine->p;
        /* Always do small skips by prime amounts. */
        if (skip > 71)
Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c:1.8 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c:1.9
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c:1.8       Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_7zip.c   Wed May 21 15:25:51 2025
@@ -34,7 +34,6 @@
 #endif
 
 #define __LIBARCHIVE_BUILD
-#include <archive_crc32.h>
 
 /*
  * Extract a non-encoded file.
@@ -406,7 +405,7 @@ test_extract_file_zstd_bcj_nobjc(const c
                la_ssize_t bytes_read = archive_read_data(a, buff, sizeof(buff));
                assert(bytes_read >= 0);
                if (bytes_read == 0) break;
-               computed_crc = crc32(computed_crc, buff, bytes_read);
+               computed_crc = bitcrc32(computed_crc, buff, bytes_read);
        }
        assertEqualInt(computed_crc, expected_crc);
 
@@ -1075,7 +1074,7 @@ test_arm_filter(const char *refname)
        assertEqualString("hw-gnueabihf", archive_entry_pathname(ae));
        assertEqualInt(sizeof(buff), archive_entry_size(ae));
        assertEqualInt(sizeof(buff), archive_read_data(a, buff, sizeof(buff)));
-       computed_crc = crc32(computed_crc, buff, sizeof(buff));
+       computed_crc = bitcrc32(computed_crc, buff, sizeof(buff));
        assertEqualInt(computed_crc, expected_crc);
 
        assertEqualInt(1, archive_file_count(a));
@@ -1149,7 +1148,7 @@ test_arm64_filter(const char *refname)
        assertEqualString("hw-arm64", archive_entry_pathname(ae));
        assertEqualInt(sizeof(buff), archive_entry_size(ae));
        assertEqualInt(sizeof(buff), archive_read_data(a, buff, sizeof(buff)));
-       computed_crc = crc32(computed_crc, buff, sizeof(buff));
+       computed_crc = bitcrc32(computed_crc, buff, sizeof(buff));
        assertEqualInt(computed_crc, expected_crc);
 
        assertEqualInt(1, archive_file_count(a));
@@ -1272,6 +1271,97 @@ DEFINE_TEST(test_read_format_7zip_win_at
        assertEqualInt(ARCHIVE_OK, archive_read_free(a));
 }
 
+DEFINE_TEST(test_read_format_7zip_sfx_pe)
+{
+       /*
+        * This is a regular 7z SFX PE file
+        * created by 7z tool v22.01 on Windows 64-bit
+        */
+       struct archive *a;
+       struct archive_entry *ae;
+       int bs = 10240;
+       char buff[32];
+       const char reffile[] = "test_read_format_7zip_sfx_pe.exe";
+       const char test_txt[] = "123";
+       int size = sizeof(test_txt) - 1;
+
+       extract_reference_file(reffile);
+       assert((a = archive_read_new()) != NULL);
+       assertA(0 == archive_read_support_filter_all(a));
+       assertA(0 == archive_read_support_format_all(a));
+       assertA(0 == archive_read_open_filename(a, reffile, bs));
+
+       assertA(0 == archive_read_next_header(a, &ae));
+       assertEqualString("test.txt.txt", archive_entry_pathname(ae));
+
+       assertA(size == archive_read_data(a, buff, size));
+       assertEqualMem(buff, test_txt, size);
+
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+       assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+
+DEFINE_TEST(test_read_format_7zip_sfx_modified_pe)
+{
+       /*
+        * This test simulates a modified 7z SFX PE
+        * the compressed data in the SFX file is still stored as PE overlay
+        * but the decompressor code is replaced
+        */
+       struct archive *a;
+       struct archive_entry *ae;
+       int bs = 10240;
+       char buff[32];
+       const char reffile[] = "test_read_format_7zip_sfx_modified_pe.exe";
+       const char test_txt[] = "123";
+       int size = sizeof(test_txt) - 1;
+
+       extract_reference_file(reffile);
+       assert((a = archive_read_new()) != NULL);
+       assertA(0 == archive_read_support_filter_all(a));
+       assertA(0 == archive_read_support_format_all(a));
+       assertA(0 == archive_read_open_filename(a, reffile, bs));
+
+       assertA(0 == archive_read_next_header(a, &ae));
+       assertEqualString("test.txt.txt", archive_entry_pathname(ae));
+
+       assertA(size == archive_read_data(a, buff, size));
+       assertEqualMem(buff, test_txt, size);
+
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+       assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+
+DEFINE_TEST(test_read_format_7zip_sfx_elf)
+{
+       /*
+        * This is a regular 7z SFX ELF file
+        * created by 7z tool v16.02 on Ubuntu
+        */
+       struct archive *a;
+       struct archive_entry *ae;
+       int bs = 10240;
+       char buff[32];
+       const char reffile[] = "test_read_format_7zip_sfx_elf.elf";
+       const char test_txt[] = "123";
+       int size = sizeof(test_txt) - 1;
+
+       extract_reference_file(reffile);
+       assert((a = archive_read_new()) != NULL);
+       assertA(0 == archive_read_support_filter_all(a));
+       assertA(0 == archive_read_support_format_all(a));
+       assertA(0 == archive_read_open_filename(a, reffile, bs));
+
+       assertA(0 == archive_read_next_header(a, &ae));
+       assertEqualString("test.txt.txt", archive_entry_pathname(ae));
+
+       assertA(size == archive_read_data(a, buff, size));
+       assertEqualMem(buff, test_txt, size);
+
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+  assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+
 DEFINE_TEST(test_read_format_7zip_extract_second)
 {
        struct archive *a;
@@ -1314,6 +1404,63 @@ DEFINE_TEST(test_read_format_7zip_extrac
        assertEqualInt(ARCHIVE_OK, archive_read_free(a));
 }
 
+#ifdef LZMA_FILTER_RISCV
+static void
+test_riscv_filter(const char *refname)
+{
+       struct archive *a;
+       struct archive_entry *ae;
+       char buff[8488];
+       uint32_t computed_crc = 0;
+       uint32_t expected_crc = 0xf7ed24e7;
+
+       assert((a = archive_read_new()) != NULL);
+
+       extract_reference_file(refname);
+
+       assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+       assert((a = archive_read_new()) != NULL);
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_support_filter_all(a));
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_support_format_all(a));
+
+       assertEqualIntA(a, ARCHIVE_OK,
+               archive_read_open_filename(a, refname, 10240));
+
+       assertEqualIntA(a, ARCHIVE_OK, archive_read_next_header(a, &ae));
+       assertEqualInt((AE_IFREG | 0775), archive_entry_mode(ae));
+       assertEqualString("hw-riscv64", archive_entry_pathname(ae));
+       assertEqualInt(sizeof(buff), archive_entry_size(ae));
+       assertEqualInt(sizeof(buff), archive_read_data(a, buff, sizeof(buff)));
+
+       computed_crc = bitcrc32(computed_crc, buff, sizeof(buff));
+       assertEqualInt(computed_crc, expected_crc);
+
+       assertEqualInt(1, archive_file_count(a));
+
+       assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
+
+       assertEqualInt(ARCHIVE_OK, archive_read_close(a));
+       assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+#endif
+
+DEFINE_TEST(test_read_format_7zip_lzma2_riscv)
+{
+#ifdef LZMA_FILTER_RISCV
+       struct archive *a;
+
+       assert((a = archive_read_new()) != NULL);
+
+       if (ARCHIVE_OK != archive_read_support_filter_lzma(a)) {
+               skipping("7zip:lzma decoding is not supported on this platform");
+       } else {
+               test_riscv_filter("test_read_format_7zip_lzma2_riscv.7z");
+       }
+#else
+       skipping("This version of liblzma does not support LZMA_FILTER_RISCV");
+#endif
+}
+
 static void
 test_sparc_filter(const char *refname)
 {
@@ -1342,7 +1489,7 @@ test_sparc_filter(const char *refname)
        assertEqualInt(expected_entry_size, archive_entry_size(ae));
        assertEqualInt(expected_entry_size, archive_read_data(a, buff, expected_entry_size));
 
-       computed_crc = crc32(computed_crc, buff, expected_entry_size);
+       computed_crc = bitcrc32(computed_crc, buff, expected_entry_size);
        assertEqualInt(computed_crc, expected_crc);
 
        assertEqualInt(1, archive_file_count(a));
@@ -1415,7 +1562,7 @@ test_powerpc_filter(const char *refname)
        assertEqualInt(expected_entry_size, archive_entry_size(ae));
        assertEqualInt(expected_entry_size, archive_read_data(a, buff, expected_entry_size));
 
-       computed_crc = crc32(computed_crc, buff, expected_entry_size);
+       computed_crc = bitcrc32(computed_crc, buff, expected_entry_size);
        assertEqualInt(computed_crc, expected_crc);
 
        assertEqualInt(1, archive_file_count(a));
@@ -1440,6 +1587,22 @@ DEFINE_TEST(test_read_format_7zip_deflat
        } else {
                test_powerpc_filter("test_read_format_7zip_deflate_powerpc.7z");
        }
+  
+       assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+
+DEFINE_TEST(test_read_format_7zip_lzma2_powerpc)
+{
+       struct archive *a;
+
+       assert((a = archive_read_new()) != NULL);
 
+       if (ARCHIVE_OK != archive_read_support_filter_gzip(a)) {
+               skipping(
+                   "7zip:deflate decoding is not supported on this platform");
+       } else {
+               test_powerpc_filter("test_read_format_7zip_lzma2_powerpc.7z");
+       }
+  
        assertEqualInt(ARCHIVE_OK, archive_read_free(a));
 }

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c:1.9 pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c:1.10
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c:1.9      Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_acl_platform_nfs4.c  Wed May 21 15:25:51 2025
@@ -424,7 +424,7 @@ acl_flagset_to_bitmap(acl_flagset_t opaq
 #if ARCHIVE_ACL_SUNOS_NFS4 || ARCHIVE_ACL_LIBRICHACL
                if (flags & perms[i].machine)
 #else
-               if (acl_get_flag_np(opaque_fs, perms[i].machine))
+               if (acl_get_flag_np(opaque_fs, (acl_flag_t)perms[i].machine))
 #endif
                        flagset |= perms[i].portable;
        return flagset;

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_match_time.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_match_time.c:1.5 pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_match_time.c:1.6
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_match_time.c:1.5     Sun Sep 15 07:02:21 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_match_time.c Wed May 21 15:25:51 2025
@@ -25,8 +25,7 @@
 
 #include "test.h"
 
-#define __LIBARCHIVE_BUILD 1
-#include "archive_getdate.h"
+#define parse_date archive_parse_date
 
 static void
 test_newer_time(void)
@@ -102,27 +101,27 @@ test_newer_time_str(void)
 
        /* Test1: Allow newer time. */
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/2/1 0:0:1 UTC");
+       t = parse_date(now, "1980/2/1 0:0:1 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 1);
        archive_entry_set_ctime(ae, t, 0);
        failure("Its mtime should be excluded");
@@ -143,20 +142,20 @@ test_newer_time_str(void)
            "1980/2/1 0:0:0 UTC"));
 
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/2/1 0:0:1 UTC");
+       t = parse_date(now, "1980/2/1 0:0:1 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
@@ -190,27 +189,27 @@ test_newer_time_str_w(void)
 
        /* Test1: Allow newer time. */
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/2/1 0:0:1 UTC");
+       t = parse_date(now, "1980/2/1 0:0:1 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 1);
        archive_entry_set_ctime(ae, t, 0);
        failure("Its mtime should be excluded");
@@ -231,20 +230,20 @@ test_newer_time_str_w(void)
            L"1980/2/1 0:0:0 UTC"));
 
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/2/1 0:0:1 UTC");
+       t = parse_date(now, "1980/2/1 0:0:1 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
@@ -569,37 +568,37 @@ test_older_time_str(void)
            ARCHIVE_MATCH_OLDER, "1980/2/1 0:0:0 UTC"));
 
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_ctime(ae, t, 0);
        failure("Its mtime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_ctime(ae, t, 0);
        failure("Its ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
@@ -612,20 +611,20 @@ test_older_time_str(void)
            "1980/2/1 0:0:0 UTC"));
 
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
@@ -659,37 +658,37 @@ test_older_time_str_w(void)
            ARCHIVE_MATCH_OLDER, L"1980/2/1 0:0:0 UTC"));
 
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_ctime(ae, t, 0);
        failure("Its mtime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
        assertEqualInt(1, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_ctime(ae, t, 0);
        failure("Its ctime should be excluded");
        assertEqualInt(1, archive_match_time_excluded(m, ae));
@@ -702,20 +701,20 @@ test_older_time_str_w(void)
            L"1980/2/1 0:0:0 UTC"));
 
        archive_entry_copy_pathname(ae, "file1");
-       t = __archive_get_date(now, "1980/2/1 0:0:0 UTC");
+       t = parse_date(now, "1980/2/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
-       t = __archive_get_date(now, "1980/1/1 0:0:0 UTC");
+       t = parse_date(now, "1980/1/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should not be excluded");
        assertEqualInt(0, archive_match_time_excluded(m, ae));
        assertEqualInt(0, archive_match_excluded(m, ae));
 
-       t = __archive_get_date(now, "1980/3/1 0:0:0 UTC");
+       t = parse_date(now, "1980/3/1 0:0:0 UTC");
        archive_entry_set_mtime(ae, t, 0);
        archive_entry_set_ctime(ae, t, 0);
        failure("Both Its mtime and ctime should be excluded");
Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_string_conversion.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_string_conversion.c:1.5 pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_string_conversion.c:1.6
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_string_conversion.c:1.5      Sun Sep 15 07:02:21 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_archive_string_conversion.c  Wed May 21 15:25:51 2025
@@ -91,7 +91,7 @@ unicode_to_utf16be(char *p, uint32_t uc)
                archive_be16enc(utf16+2, (uc & 0x3ff) + 0xDC00);
                return (4);
        } else {
-               archive_be16enc(utf16, uc);
+               archive_be16enc(utf16, (uint16_t)uc);
                return (2);
        }
 }
@@ -118,7 +118,7 @@ unicode_to_utf16le(char *p, uint32_t uc)
                archive_le16enc(utf16+2, (uc & 0x3ff) + 0xDC00);
                return (4);
        } else {
-               archive_le16enc(utf16, uc);
+               archive_le16enc(utf16, (uint16_t)uc);
                return (2);
        }
 }
Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c:1.5 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c:1.6
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c:1.5      Sat Oct 19 05:39:59 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_write_filter_gzip.c  Wed May 21 15:25:51 2025
@@ -145,6 +145,8 @@ DEFINE_TEST(test_write_filter_gzip)
            archive_write_set_filter_option(a, NULL, "compression-level", "99"));
        assertEqualIntA(a, ARCHIVE_OK,
            archive_write_set_options(a, "gzip:compression-level=9"));
+       assertEqualIntA(a, ARCHIVE_OK,
+               archive_write_set_options(a, "gzip:original-filename=testorgfilename"));
        assertEqualIntA(a, ARCHIVE_OK, archive_write_open_memory(a, buff, buffsize, &used2));
        for (i = 0; i < 100; i++) {
                snprintf(path, sizeof(path), "file%03d", i);
@@ -164,8 +166,9 @@ DEFINE_TEST(test_write_filter_gzip)
        assertEqualInt(rbuff[0], 0x1f);
        assertEqualInt(rbuff[1], 0x8b);
        assertEqualInt(rbuff[2], 0x08);
-       assertEqualInt(rbuff[3], 0x00);
+       assertEqualInt(rbuff[3], 0x08);
        assertEqualInt(rbuff[8], 2); /* RFC 1952 flag for compression level 9 */
+       assertEqualString((const char*)rbuff+10, "testorgfilename");
 
        /* Curiously, this test fails; the test data above compresses
         * better at default compression than at level 9. */

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar.c:1.6 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar.c:1.7
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar.c:1.6        Fri Apr 12 15:39:55 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar.c    Wed May 21 15:25:51 2025
@@ -3810,6 +3810,26 @@ DEFINE_TEST(test_read_format_rar_multivo
   assertEqualIntA(a, ARCHIVE_OK, archive_read_free(a));
 }
 
+DEFINE_TEST(test_read_format_rar_endarc_huge)
+{
+  const char* reffile = "test_read_format_rar_endarc_huge.rar";
+
+  struct archive_entry *ae;
+  struct archive *a;
+
+  extract_reference_file(reffile);
+  assert((a = archive_read_new()) != NULL);
+  assertA(0 == archive_read_support_filter_all(a));
+  assertA(0 == archive_read_support_format_all(a));
+  assertA(0 == archive_read_open_filename(a, reffile, 10240));
+
+  /* Test for truncation */
+  assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae));
+
+  assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+  assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+
 DEFINE_TEST(test_read_format_rar_ppmd_use_after_free)
 {
   uint8_t buf[16];
@@ -3829,8 +3849,8 @@ DEFINE_TEST(test_read_format_rar_ppmd_us
   assertA(ARCHIVE_OK == archive_read_next_header(a, &ae));
   assertA(archive_read_data(a, buf, sizeof(buf)) <= 0);
 
-  /* Test EOF */
-  assertA(1 == archive_read_next_header(a, &ae));
+  /* Test for truncation */
+  assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae));
 
   assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
   assertEqualInt(ARCHIVE_OK, archive_read_free(a));
@@ -3856,8 +3876,56 @@ DEFINE_TEST(test_read_format_rar_ppmd_us
   assertA(archive_read_data(a, buf, sizeof(buf)) <= 0);
 
   /* Test EOF */
-  assertA(1 == archive_read_next_header(a, &ae));
+  assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae));
+
+  assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+  assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+}
+
+DEFINE_TEST(test_read_format_rar_newsub_huge)
+{
+#if SIZE_MAX == UINT64_MAX
+  skipping("not relevant on 64 bit platforms");
+#else
+  const char* reffile = "test_read_format_rar_newsub_huge.rar";
+
+  struct archive_entry *ae;
+  struct archive *a;
+
+  extract_reference_file(reffile);
+  assert((a = archive_read_new()) != NULL);
+  assertA(0 == archive_read_support_filter_all(a));
+  assertA(0 == archive_read_support_format_all(a));
+  assertA(0 == archive_read_open_filename(a, reffile, 10240));
+
+  /* Test for truncation */
+  assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae));
+
+  assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
+  assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+#endif
+}
+
+DEFINE_TEST(test_read_format_rar_symlink_huge)
+{
+#if SIZE_MAX == UINT64_MAX
+  skipping("not relevant on 64 bit platforms");
+#else
+  const char* reffile = "test_read_format_rar_symlink_huge.rar";
+
+  struct archive_entry *ae;
+  struct archive *a;
+
+  extract_reference_file(reffile);
+  assert((a = archive_read_new()) != NULL);
+  assertA(0 == archive_read_support_filter_all(a));
+  assertA(0 == archive_read_support_format_all(a));
+  assertA(0 == archive_read_open_filename(a, reffile, 10240));
+
+  /* Test for invalid entry */
+  assertA(ARCHIVE_FATAL == archive_read_next_header(a, &ae));
 
   assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a));
   assertEqualInt(ARCHIVE_OK, archive_read_free(a));
+#endif
 }
Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c:1.6 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c:1.7
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c:1.6       Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_rar5.c   Wed May 21 15:25:51 2025
@@ -27,7 +27,6 @@
 /* Some tests will want to calculate some CRC32's, and this header can
  * help. */
 #define __LIBARCHIVE_BUILD
-#include <archive_crc32.h>
 #include <archive_endian.h>
 
 #define PROLOGUE(reffile) \
@@ -82,7 +81,7 @@ int verify_data(const uint8_t* data_ptr,
                /* *lptr is a value inside unpacked test file, val is the
                 * value that should be in the unpacked test file. */
 
-               if(archive_le32dec(lptr) != (uint32_t) val)
+               if(i4le(lptr) != (uint32_t) val)
                        return 0;
        }
 
@@ -107,7 +106,7 @@ int extract_one(struct archive* a, struc
                goto fn_exit;
        }
 
-       computed_crc = crc32(0, buf, fsize);
+       computed_crc = bitcrc32(0, buf, fsize);
        assertEqualInt(computed_crc, crc);
        ret = 0;
 
@@ -336,7 +335,7 @@ DEFINE_TEST(test_read_format_rar5_blake2
        assertA(proper_size == archive_read_data(a, buf, proper_size));
 
        /* To be extra pedantic, let's also check crc32 of the poem. */
-       assertEqualInt(crc32(0, buf, proper_size), 0x7E5EC49E);
+       assertEqualInt(bitcrc32(0, buf, proper_size), 0x7E5EC49E);
 
        assertA(ARCHIVE_EOF == archive_read_next_header(a, &ae));
        EPILOGUE();
@@ -359,7 +358,7 @@ DEFINE_TEST(test_read_format_rar5_arm_fi
        /* Yes, RARv5 unpacker itself should calculate the CRC, but in case
         * the DONT_FAIL_ON_CRC_ERROR define option is enabled during compilation,
         * let's still fail the test if the unpacked data is wrong. */
-       assertEqualInt(crc32(0, buf, proper_size), 0x886F91EB);
+       assertEqualInt(bitcrc32(0, buf, proper_size), 0x886F91EB);
 
        assertA(ARCHIVE_EOF == archive_read_next_header(a, &ae));
        EPILOGUE();
@@ -870,7 +869,7 @@ DEFINE_TEST(test_read_format_rar5_block_
                if(bytes_read <= 0)
                        break;
 
-               computed_crc = crc32(computed_crc, buf, bytes_read);
+               computed_crc = bitcrc32(computed_crc, buf, bytes_read);
        }
 
        assertEqualInt(computed_crc, 0x7CCA70CD);

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c:1.11 pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c:1.12
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c:1.11       Fri Apr 12 15:39:55 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_read_format_zip.c    Wed May 21 15:25:51 2025
@@ -26,7 +26,6 @@
 #include "test.h"
 
 #define __LIBARCHIVE_BUILD
-#include <archive_crc32.h>
 
 static
 int extract_one(struct archive* a, struct archive_entry* ae, uint32_t crc)
@@ -47,7 +46,7 @@ int extract_one(struct archive* a, struc
                goto fn_exit;
        }
 
-       computed_crc = crc32(0, buf, fsize);
+       computed_crc = bitcrc32(0, buf, fsize);
        assertEqualInt(computed_crc, crc);
        ret = 0;
 
@@ -84,7 +83,7 @@ int extract_one_using_blocks(struct arch
                        /* ok */
                }
 
-               computed_crc = crc32(computed_crc, buf, bytes_read);
+               computed_crc = bitcrc32(computed_crc, buf, bytes_read);
        }
 
        assertEqualInt(computed_crc, crc);

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_sparse_basic.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_sparse_basic.c:1.10 pkgsrc/archivers/libarchive/files/libarchive/test/test_sparse_basic.c:1.11
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_sparse_basic.c:1.10  Mon Apr 28 10:31:34 2025
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_sparse_basic.c       Wed May 21 15:25:51 2025
@@ -608,7 +608,8 @@ DEFINE_TEST(test_sparse_basic)
        verify_sparse_file(a, "file2", sparse_file2, 20);
        /* Encoded non sparse; expect a data block but no sparse entries. */
        verify_sparse_file(a, "file3", sparse_file3, 0);
-       verify_sparse_file(a, "file4", sparse_file4, 2);
+       if (sizeof(off_t) > 4)
+               verify_sparse_file(a, "file4", sparse_file4, 2);
 
        assertEqualInt(ARCHIVE_OK, archive_read_free(a));
 
@@ -635,7 +636,8 @@ DEFINE_TEST(test_sparse_basic)
        verify_sparse_file(a, "file1", sparse_file1, 0);
        verify_sparse_file(a, "file2", sparse_file2, 0);
        verify_sparse_file(a, "file3", sparse_file3, 0);
-       verify_sparse_file(a, "file4", sparse_file4, 0);
+       if (sizeof(off_t) > 4)
+               verify_sparse_file(a, "file4", sparse_file4, 0);
 
        assertEqualInt(ARCHIVE_OK, archive_read_free(a));
 

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c:1.7 pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c:1.8
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c:1.7      Sat Oct 19 05:39:59 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_tar_large.c  Wed May 21 15:25:51 2025
@@ -175,7 +175,7 @@ memory_read_skip(struct archive *a, void
        }
        if (private->filebytes > 0) {
                if (private->filebytes < skip)
-                       skip = (off_t)private->filebytes;
+                       skip = private->filebytes;
                private->filebytes -= skip;
        } else {
                skip = 0;

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip.c:1.2 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip.c:1.3
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip.c:1.2      Fri Apr 12 15:39:56 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip.c  Wed May 21 15:25:51 2025
@@ -567,3 +567,9 @@ DEFINE_TEST(test_write_format_7zip_basic
        /* Test that making a 7-Zip archive file with PPMd compression. */
        test_basic("ppmd");
 }
+
+DEFINE_TEST(test_write_format_7zip_basic_zstd)
+{
+       /* Test that making a 7-Zip archive file with zstandard compression. */
+       test_basic("zstd");
+}

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip_large.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip_large.c:1.3 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip_large.c:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip_large.c:1.3        Fri Apr 12 15:39:56 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_7zip_large.c    Wed May 21 15:25:51 2025
@@ -169,3 +169,9 @@ DEFINE_TEST(test_write_format_7zip_large
        /* Test that making a 7-Zip archive file with PPMd compression. */
        test_large("ppmd");
 }
+
+DEFINE_TEST(test_write_format_7zip_large_zstd)
+{
+       /* Test that making a 7-Zip archive file with zstd compression. */
+       test_large("zstd");
+}
Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_gnutar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_gnutar.c:1.3 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_gnutar.c:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_gnutar.c:1.3    Fri Apr 12 15:39:56 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_gnutar.c        Wed May 21 15:25:51 2025
@@ -93,6 +93,29 @@ static const char *longhardlinkname = "Y
     "12345678901234567890123456789012345678901234567890"
     "12345678901234567890123456789012345678901234567890";
 
+static const char *longfilename_largeuid = "large_uid_gid---"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890"
+    "12345678901234567890123456789012345678901234567890";
+
+
 
 DEFINE_TEST(test_write_format_gnutar)
 {
@@ -162,7 +185,7 @@ DEFINE_TEST(test_write_format_gnutar)
         * A file with large UID/GID that overflow octal encoding.
         */
        assert((ae = archive_entry_new()) != NULL);
-       archive_entry_copy_pathname(ae, "large_uid_gid");
+       archive_entry_copy_pathname(ae, longfilename_largeuid);
        archive_entry_set_mode(ae, S_IFREG | 0755);
        archive_entry_set_size(ae, 8);
        archive_entry_set_uid(ae, 123456789);
@@ -185,7 +208,7 @@ DEFINE_TEST(test_write_format_gnutar)
        /* Verify GNU tar magic/version fields */
        assertEqualMem(buff + 257, "ustar  \0", 8);
 
-       assertEqualInt(15360, used);
+       assertEqualInt(16896, used);
 
        /*
         *
@@ -243,7 +266,7 @@ DEFINE_TEST(test_write_format_gnutar)
        assertEqualIntA(a, 0, archive_read_next_header(a, &ae));
        assertEqualInt(123456789, archive_entry_uid(ae));
        assertEqualInt(987654321, archive_entry_gid(ae));
-       assertEqualString("large_uid_gid", archive_entry_pathname(ae));
+       assertEqualString(longfilename_largeuid, archive_entry_pathname(ae));
        assertEqualInt(S_IFREG | 0755, archive_entry_mode(ae));
 
        /*
Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_xar.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_xar.c:1.3 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_xar.c:1.4
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_xar.c:1.3       Fri Apr 12 15:39:56 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_xar.c   Wed May 21 15:25:51 2025
@@ -25,6 +25,8 @@
  */
 #include "test.h"
 
+#include <locale.h>
+
 static void
 test_xar(const char *option)
 {
@@ -147,6 +149,20 @@ test_xar(const char *option)
        archive_entry_free(ae);
 
        /*
+        * "dir/file{UNICODE}" has a name that requires base64 encoding
+        */
+       assert((ae = archive_entry_new()) != NULL);
+       archive_entry_set_atime(ae, 2, 20);
+       archive_entry_set_ctime(ae, 4, 40);
+       archive_entry_set_mtime(ae, 5, 50);
+       archive_entry_copy_pathname_w(ae, L"dir/file\U0001F574");
+       archive_entry_set_mode(ae, AE_IFREG | 0755);
+       archive_entry_set_size(ae, 8);
+       assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+       archive_entry_free(ae);
+       assertEqualIntA(a, 8, archive_write_data(a, "ghijklmn", 9));
+
+       /*
         * XXX TODO XXX Archive directory, other file types.
         * Archive extended attributes, ACLs, other metadata.
         * Verify they get read back correctly.
@@ -262,6 +278,22 @@ test_xar(const char *option)
        assert((AE_IFDIR | 0755) == archive_entry_mode(ae));
 
        /*
+        * Read "dir/file{UNICODE}"
+        */
+       assertEqualIntA(a, 0, archive_read_next_header(a, &ae));
+       assertEqualInt(2, archive_entry_atime(ae));
+       assertEqualInt(0, archive_entry_atime_nsec(ae));
+       assertEqualInt(4, archive_entry_ctime(ae));
+       assertEqualInt(0, archive_entry_ctime_nsec(ae));
+       assertEqualInt(5, archive_entry_mtime(ae));
+       assertEqualInt(0, archive_entry_mtime_nsec(ae));
+       assertEqualWString(L"dir/file\U0001F574", archive_entry_pathname_w(ae));
+       assert((AE_IFREG | 0755) == archive_entry_mode(ae));
+       assertEqualInt(8, archive_entry_size(ae));
+       assertEqualIntA(a, 8, archive_read_data(a, buff2, 10));
+       assertEqualMem(buff2, "ghijklmn", 8);
+
+       /*
         * Verify the end of the archive.
         */
        assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae));
@@ -273,6 +305,13 @@ test_xar(const char *option)
 
 DEFINE_TEST(test_write_format_xar)
 {
+       /* xar mandates the use of UTF-8 XML; if we cannot
+        * use UTF-8, perhaps we should not write xar. */
+       if (NULL == setlocale(LC_ALL, "en_US.UTF-8")) {
+               skipping("en_US.UTF-8 locale not available on this system.");
+               return;
+       }
+
        /* Default mode. */
        test_xar(NULL);
 

Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c:1.4 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c:1.4  Fri Apr 12 15:39:56 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file.c      Wed May 21 15:25:51 2025
@@ -35,38 +35,6 @@
  * with a single file written to it.
  */
 
-static unsigned long
-bitcrc32(unsigned long c, void *_p, size_t s)
-{
-       /* This is a drop-in replacement for crc32() from zlib.
-        * Libarchive should be able to correctly generate
-        * uncompressed zip archives (including correct CRCs) even
-        * when zlib is unavailable, and this function helps us verify
-        * that.  Yes, this is very, very slow and unsuitable for
-        * production use, but it's correct, compact, and works well
-        * enough for this particular usage.  Libarchive internally
-        * uses a much more efficient implementation.  */
-       const unsigned char *p = _p;
-       int bitctr;
-
-       if (p == NULL)
-               return (0);
-
-       for (; s > 0; --s) {
-               c ^= *p++;
-               for (bitctr = 8; bitctr > 0; --bitctr) {
-                       if (c & 1) c = (c >> 1);
-                       else       c = (c >> 1) ^ 0xedb88320;
-                       c ^= 0x80000000;
-               }
-       }
-       return (c);
-}
-
-/* Quick and dirty: Read 2-byte and 4-byte integers from Zip file. */
-static unsigned i2(const unsigned char *p) { return ((p[0] & 0xff) | ((p[1] & 0xff) << 8)); }
-static unsigned i4(const unsigned char *p) { return (i2(p) | (i2(p + 2) << 16)); }
-
 DEFINE_TEST(test_write_format_zip_file)
 {
        struct archive *a;
@@ -78,7 +46,7 @@ DEFINE_TEST(test_write_format_zip_file)
 #endif
        size_t used, buffsize = 1000000;
        unsigned long crc;
-       int file_perm = 00644;
+       __LA_MODE_T file_perm = 00644;
        int zip_version = 20;
        int zip_compression = 8;
        short file_uid = 10, file_gid = 20;
@@ -131,60 +99,60 @@ DEFINE_TEST(test_write_format_zip_file)
        failure("End-of-central-directory begins with PK\\005\\006 signature");
        assertEqualMem(p, "PK\005\006", 4);
        failure("This must be disk 0");
-       assertEqualInt(i2(p + 4), 0);
+       assertEqualInt(i2le(p + 4), 0);
        failure("Central dir must start on disk 0");
-       assertEqualInt(i2(p + 6), 0);
+       assertEqualInt(i2le(p + 6), 0);
        failure("All central dir entries are on this disk");
-       assertEqualInt(i2(p + 8), i2(p + 10));
-       eocd = buff + i4(p + 12) + i4(p + 16);
+       assertEqualInt(i2le(p + 8), i2le(p + 10));
+       eocd = buff + i4le(p + 12) + i4le(p + 16);
        failure("no zip comment");
-       assertEqualInt(i2(p + 20), 0);
+       assertEqualInt(i2le(p + 20), 0);
 
        /* Get address of first entry in central directory. */
-       central_header = p = buff + i4(buffend - 6);
-       failure("Central file record at offset %d should begin with"
+       central_header = p = buff + i4le(buffend - 6);
+       failure("Central file record at offset %u should begin with"
            " PK\\001\\002 signature",
-           i4(buffend - 10));
+           i4le(buffend - 10));
 
        /* Verify file entry in central directory. */
        assertEqualMem(p, "PK\001\002", 4); /* Signature */
-       assertEqualInt(i2(p + 4), 3 * 256 + zip_version); /* Version made by */
-       assertEqualInt(i2(p + 6), zip_version); /* Version needed to extract */
-       assertEqualInt(i2(p + 8), 8); /* Flags */
-       assertEqualInt(i2(p + 10), zip_compression); /* Compression method */
-       assertEqualInt(i2(p + 12), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
-       assertEqualInt(i2(p + 14), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
+       assertEqualInt(i2le(p + 4), 3 * 256 + zip_version); /* Version made by */
+       assertEqualInt(i2le(p + 6), zip_version); /* Version needed to extract */
+       assertEqualInt(i2le(p + 8), 8); /* Flags */
+       assertEqualInt(i2le(p + 10), zip_compression); /* Compression method */
+       assertEqualInt(i2le(p + 12), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
+       assertEqualInt(i2le(p + 14), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
        crc = bitcrc32(0, file_data, sizeof(file_data));
-       assertEqualInt(i4(p + 16), crc); /* CRC-32 */
-       /* assertEqualInt(i4(p + 20), sizeof(file_data)); */ /* Compressed size */
-       assertEqualInt(i4(p + 24), sizeof(file_data)); /* Uncompressed size */
-       assertEqualInt(i2(p + 28), strlen(file_name)); /* Pathname length */
-       /* assertEqualInt(i2(p + 30), 28); */ /* Extra field length: See below */
-       assertEqualInt(i2(p + 32), 0); /* File comment length */
-       assertEqualInt(i2(p + 34), 0); /* Disk number start */
-       assertEqualInt(i2(p + 36), 0); /* Internal file attrs */
-       assertEqualInt(i4(p + 38) >> 16 & 01777, file_perm); /* External file attrs */
-       assertEqualInt(i4(p + 42), 0); /* Offset of local header */
+       assertEqualInt(i4le(p + 16), crc); /* CRC-32 */
+       /* assertEqualInt(i4le(p + 20), sizeof(file_data)); */ /* Compressed size */
+       assertEqualInt(i4le(p + 24), sizeof(file_data)); /* Uncompressed size */
+       assertEqualInt(i2le(p + 28), strlen(file_name)); /* Pathname length */
+       /* assertEqualInt(i2le(p + 30), 28); */ /* Extra field length: See below */
+       assertEqualInt(i2le(p + 32), 0); /* File comment length */
+       assertEqualInt(i2le(p + 34), 0); /* Disk number start */
+       assertEqualInt(i2le(p + 36), 0); /* Internal file attrs */
+       assertEqualInt(i4le(p + 38) >> 16 & 01777, file_perm); /* External file attrs */
+       assertEqualInt(i4le(p + 42), 0); /* Offset of local header */
        assertEqualMem(p + 46, file_name, strlen(file_name)); /* Pathname */
        p = extension_start = central_header + 46 + strlen(file_name);
-       extension_end = extension_start + i2(central_header + 30);
+       extension_end = extension_start + i2le(central_header + 30);
 
-       assertEqualInt(i2(p), 0x7875);  /* 'ux' extension header */
-       assertEqualInt(i2(p + 2), 11); /* 'ux' size */
+       assertEqualInt(i2le(p), 0x7875);  /* 'ux' extension header */
+       assertEqualInt(i2le(p + 2), 11); /* 'ux' size */
        /* TODO: verify 'ux' contents */
-       p += 4 + i2(p + 2);
+       p += 4 + i2le(p + 2);
 
-       assertEqualInt(i2(p), 0x5455);  /* 'UT' extension header */
-       assertEqualInt(i2(p + 2), 5); /* 'UT' size */
+       assertEqualInt(i2le(p), 0x5455);  /* 'UT' extension header */
+       assertEqualInt(i2le(p + 2), 5); /* 'UT' size */
        assertEqualInt(p[4], 1); /* 'UT' flags */
-       assertEqualInt(i4(p + 5), t); /* 'UT' mtime */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i4le(p + 5), t); /* 'UT' mtime */
+       p += 4 + i2le(p + 2);
 
        /* Just in case: Report any extra extensions. */
        while (p < extension_end) {
-               failure("Unexpected extension 0x%04X", i2(p));
+               failure("Unexpected extension 0x%04X", i2le(p));
                assert(0);
-               p += 4 + i2(p + 2);
+               p += 4 + i2le(p + 2);
        }
 
        /* Should have run exactly to end of extra data. */
@@ -198,48 +166,48 @@ DEFINE_TEST(test_write_format_zip_file)
        /* Verify local header of file entry. */
        p = local_header = buff;
        assertEqualMem(p, "PK\003\004", 4); /* Signature */
-       assertEqualInt(i2(p + 4), zip_version); /* Version needed to extract */
-       assertEqualInt(i2(p + 6), 8); /* Flags: bit 3 = length-at-end */
-       assertEqualInt(i2(p + 8), zip_compression); /* Compression method */
-       assertEqualInt(i2(p + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
-       assertEqualInt(i2(p + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
-       assertEqualInt(i4(p + 14), 0); /* CRC-32 stored as zero because we're using length-at-end */
-       assertEqualInt(i4(p + 18), 0); /* Compressed size stored as zero because we're using length-at-end. */
-       assertEqualInt(i4(p + 22), 0); /* Uncompressed size stored as zero because we're using length-at-end. */
-       assertEqualInt(i2(p + 26), strlen(file_name)); /* Pathname length */
-       assertEqualInt(i2(p + 28), 37); /* Extra field length */
+       assertEqualInt(i2le(p + 4), zip_version); /* Version needed to extract */
+       assertEqualInt(i2le(p + 6), 8); /* Flags: bit 3 = length-at-end */
+       assertEqualInt(i2le(p + 8), zip_compression); /* Compression method */
+       assertEqualInt(i2le(p + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
+       assertEqualInt(i2le(p + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
+       assertEqualInt(i4le(p + 14), 0); /* CRC-32 stored as zero because we're using length-at-end */
+       assertEqualInt(i4le(p + 18), 0); /* Compressed size stored as zero because we're using length-at-end. */
+       assertEqualInt(i4le(p + 22), 0); /* Uncompressed size stored as zero because we're using length-at-end. */
+       assertEqualInt(i2le(p + 26), strlen(file_name)); /* Pathname length */
+       assertEqualInt(i2le(p + 28), 37); /* Extra field length */
        assertEqualMem(p + 30, file_name, strlen(file_name)); /* Pathname */
        p = extension_start = local_header + 30 + strlen(file_name);
-       extension_end = extension_start + i2(local_header + 28);
+       extension_end = extension_start + i2le(local_header + 28);
 
-       assertEqualInt(i2(p), 0x7875);  /* 'ux' extension header */
-       assertEqualInt(i2(p + 2), 11); /* size */
+       assertEqualInt(i2le(p), 0x7875);  /* 'ux' extension header */
+       assertEqualInt(i2le(p + 2), 11); /* size */
        assertEqualInt(p[4], 1); /* 'ux' version */
        assertEqualInt(p[5], 4); /* 'ux' uid size */
-       assertEqualInt(i4(p + 6), file_uid); /* 'Ux' UID */
+       assertEqualInt(i4le(p + 6), file_uid); /* 'Ux' UID */
        assertEqualInt(p[10], 4); /* 'ux' gid size */
-       assertEqualInt(i4(p + 11), file_gid); /* 'Ux' GID */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i4le(p + 11), file_gid); /* 'Ux' GID */
+       p += 4 + i2le(p + 2);
 
-       assertEqualInt(i2(p), 0x5455);  /* 'UT' extension header */
-       assertEqualInt(i2(p + 2), 5); /* size */
+       assertEqualInt(i2le(p), 0x5455);  /* 'UT' extension header */
+       assertEqualInt(i2le(p + 2), 5); /* size */
        assertEqualInt(p[4], 1); /* 'UT' flags */
-       assertEqualInt(i4(p + 5), t); /* 'UT' mtime */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i4le(p + 5), t); /* 'UT' mtime */
+       p += 4 + i2le(p + 2);
 
-       assertEqualInt(i2(p), 0x6c78); /* 'xl' experimental extension block */
-       assertEqualInt(i2(p + 2), 9); /* size */
+       assertEqualInt(i2le(p), 0x6c78); /* 'xl' experimental extension block */
+       assertEqualInt(i2le(p + 2), 9); /* size */
        assertEqualInt(p[4], 7); /* bitmap of fields in this block */
-       assertEqualInt(i2(p + 5) >> 8, 3); /* System & version made by */
-       assertEqualInt(i2(p + 7), 0); /* internal file attributes */
-       assertEqualInt(i4(p + 9) >> 16 & 01777, file_perm); /* external file attributes */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i2le(p + 5) >> 8, 3); /* System & version made by */
+       assertEqualInt(i2le(p + 7), 0); /* internal file attributes */
+       assertEqualInt(i4le(p + 9) >> 16 & 01777, file_perm); /* external file attributes */
+       p += 4 + i2le(p + 2);
 
        /* Just in case: Report any extra extensions. */
        while (p < extension_end) {
-               failure("Unexpected extension 0x%04X", i2(p));
+               failure("Unexpected extension 0x%04X", i2le(p));
                assert(0);
-               p += 4 + i2(p + 2);
+               p += 4 + i2le(p + 2);
        }
 
        /* Should have run exactly to end of extra data. */
@@ -249,9 +217,9 @@ DEFINE_TEST(test_write_format_zip_file)
        while (p < central_header && memcmp(p, "PK\007\010", 4) != 0)
                ++p;
        assertEqualMem(p, "PK\007\010", 4);
-       assertEqualInt(i4(p + 4), crc); /* CRC-32 */
-       assertEqualInt(i4(p + 8), p - extension_end); /* compressed size */
-       assertEqualInt(i4(p + 12), sizeof(file_data)); /* uncompressed size */
+       assertEqualInt(i4le(p + 4), crc); /* CRC-32 */
+       assertEqualInt(i4le(p + 8), p - extension_end); /* compressed size */
+       assertEqualInt(i4le(p + 12), sizeof(file_data)); /* uncompressed size */
 
        /* Central directory should immediately follow the only entry. */
        assertEqualAddress(p + 16, central_header);
Index: pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c
diff -u pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c:1.4 pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c:1.5
--- pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c:1.4    Fri Apr 12 15:39:56 2024
+++ pkgsrc/archivers/libarchive/files/libarchive/test/test_write_format_zip_file_zip64.c        Wed May 21 15:25:51 2025
@@ -35,40 +35,6 @@
  * with a single file written to it that uses Zip64 extensions.
  */
 
-static unsigned long
-bitcrc32(unsigned long c, void *_p, size_t s)
-{
-       /* This is a drop-in replacement for crc32() from zlib.
-        * Libarchive should be able to correctly generate
-        * uncompressed zip archives (including correct CRCs) even
-        * when zlib is unavailable, and this function helps us verify
-        * that.  Yes, this is very, very slow and unsuitable for
-        * production use, but it's correct, compact, and works well
-        * enough for this particular usage.  Libarchive internally
-        * uses a much more efficient implementation.  */
-       const unsigned char *p = _p;
-       int bitctr;
-
-       if (p == NULL)
-               return (0);
-
-       for (; s > 0; --s) {
-               c ^= *p++;
-               for (bitctr = 8; bitctr > 0; --bitctr) {
-                       if (c & 1) c = (c >> 1);
-                       else       c = (c >> 1) ^ 0xedb88320;
-                       c ^= 0x80000000;
-               }
-       }
-       return (c);
-}
-
-/* Quick and dirty: Read 2-byte and 4-byte integers from Zip file. */
-static unsigned i2(const unsigned char *p) { return ((p[0] & 0xff) | ((p[1] & 0xff) << 8)); }
-static unsigned i4(const unsigned char *p) { return (i2(p) | (i2(p + 2) << 16)); }
-/* We're only working with small values here; ignore the 4 high bytes. */
-static unsigned i8(const unsigned char *p) { return (i4(p)); }
-
 DEFINE_TEST(test_write_format_zip_file_zip64)
 {
        struct archive *a;
@@ -80,7 +46,7 @@ DEFINE_TEST(test_write_format_zip_file_z
 #endif
        size_t used, buffsize = 1000000;
        unsigned long crc;
-       int file_perm = 00644;
+       __LA_MODE_T file_perm = 00644;
        int zip_version = 45;
        int zip_compression = 8;
        short file_uid = 10, file_gid = 20;
@@ -134,54 +100,54 @@ DEFINE_TEST(test_write_format_zip_file_z
        failure("End-of-central-directory begins with PK\\005\\006 signature");
        assertEqualMem(p, "PK\005\006", 4);
        failure("This must be disk 0");
-       assertEqualInt(i2(p + 4), 0);
+       assertEqualInt(i2le(p + 4), 0);
        failure("Central dir must start on disk 0");
-       assertEqualInt(i2(p + 6), 0);
+       assertEqualInt(i2le(p + 6), 0);
        failure("All central dir entries are on this disk");
-       assertEqualInt(i2(p + 8), i2(p + 10));
-       eocd = buff + i4(p + 12) + i4(p + 16);
+       assertEqualInt(i2le(p + 8), i2le(p + 10));
+       eocd = buff + i4le(p + 12) + i4le(p + 16);
        failure("no zip comment");
-       assertEqualInt(i2(p + 20), 0);
+       assertEqualInt(i2le(p + 20), 0);
 
        /* Get address of first entry in central directory. */
-       central_header = p = buff + i4(buffend - 6);
-       failure("Central file record at offset %d should begin with"
+       central_header = p = buff + i4le(buffend - 6);
+       failure("Central file record at offset %u should begin with"
            " PK\\001\\002 signature",
-           i4(buffend - 10));
+           i4le(buffend - 10));
 
        /* Verify file entry in central directory. */
        assertEqualMem(p, "PK\001\002", 4); /* Signature */
-       assertEqualInt(i2(p + 4), 3 * 256 + zip_version); /* Version made by */
-       assertEqualInt(i2(p + 6), zip_version); /* Version needed to extract */
-       assertEqualInt(i2(p + 8), 8); /* Flags */
-       assertEqualInt(i2(p + 10), zip_compression); /* Compression method */
-       assertEqualInt(i2(p + 12), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
-       assertEqualInt(i2(p + 14), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
+       assertEqualInt(i2le(p + 4), 3 * 256 + zip_version); /* Version made by */
+       assertEqualInt(i2le(p + 6), zip_version); /* Version needed to extract */
+       assertEqualInt(i2le(p + 8), 8); /* Flags */
+       assertEqualInt(i2le(p + 10), zip_compression); /* Compression method */
+       assertEqualInt(i2le(p + 12), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
+       assertEqualInt(i2le(p + 14), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
        crc = bitcrc32(0, file_data, sizeof(file_data));
-       assertEqualInt(i4(p + 16), crc); /* CRC-32 */
-       /* assertEqualInt(i4(p + 20), sizeof(file_data)); */ /* Compressed size */
-       assertEqualInt(i4(p + 24), sizeof(file_data)); /* Uncompressed size */
-       assertEqualInt(i2(p + 28), strlen(file_name)); /* Pathname length */
-       /* assertEqualInt(i2(p + 30), 28); */ /* Extra field length: See below */
-       assertEqualInt(i2(p + 32), 0); /* File comment length */
-       assertEqualInt(i2(p + 34), 0); /* Disk number start */
-       assertEqualInt(i2(p + 36), 0); /* Internal file attrs */
-       assertEqualInt(i4(p + 38) >> 16 & 01777, file_perm); /* External file attrs */
-       assertEqualInt(i4(p + 42), 0); /* Offset of local header */
+       assertEqualInt(i4le(p + 16), crc); /* CRC-32 */
+       /* assertEqualInt(i4le(p + 20), sizeof(file_data)); */ /* Compressed size */
+       assertEqualInt(i4le(p + 24), sizeof(file_data)); /* Uncompressed size */
+       assertEqualInt(i2le(p + 28), strlen(file_name)); /* Pathname length */
+       /* assertEqualInt(i2le(p + 30), 28); */ /* Extra field length: See below */
+       assertEqualInt(i2le(p + 32), 0); /* File comment length */
+       assertEqualInt(i2le(p + 34), 0); /* Disk number start */
+       assertEqualInt(i2le(p + 36), 0); /* Internal file attrs */
+       assertEqualInt(i4le(p + 38) >> 16 & 01777, file_perm); /* External file attrs */
+       assertEqualInt(i4le(p + 42), 0); /* Offset of local header */
        assertEqualMem(p + 46, file_name, strlen(file_name)); /* Pathname */
        p = extension_start = central_header + 46 + strlen(file_name);
-       extension_end = extension_start + i2(central_header + 30);
+       extension_end = extension_start + i2le(central_header + 30);
 
-       assertEqualInt(i2(p), 0x7875);  /* 'ux' extension header */
-       assertEqualInt(i2(p + 2), 11); /* 'ux' size */
+       assertEqualInt(i2le(p), 0x7875);  /* 'ux' extension header */
+       assertEqualInt(i2le(p + 2), 11); /* 'ux' size */
        /* TODO: verify 'ux' contents */
-       p += 4 + i2(p + 2);
+       p += 4 + i2le(p + 2);
 
-       assertEqualInt(i2(p), 0x5455);  /* 'UT' extension header */
-       assertEqualInt(i2(p + 2), 5); /* 'UT' size */
+       assertEqualInt(i2le(p), 0x5455);  /* 'UT' extension header */
+       assertEqualInt(i2le(p + 2), 5); /* 'UT' size */
        assertEqualInt(p[4], 1); /* 'UT' flags */
-       assertEqualInt(i4(p + 5), t); /* 'UT' mtime */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i4le(p + 5), t); /* 'UT' mtime */
+       p += 4 + i2le(p + 2);
 
        /* Note: We don't expect to see zip64 extension in the central
         * directory, since the writer knows the actual full size by
@@ -191,9 +157,9 @@ DEFINE_TEST(test_write_format_zip_file_z
 
        /* Just in case: Report any extra extensions. */
        while (p < extension_end) {
-               failure("Unexpected extension 0x%04X", i2(p));
+               failure("Unexpected extension 0x%04X", i2le(p));
                assert(0);
-               p += 4 + i2(p + 2);
+               p += 4 + i2le(p + 2);
        }
 
        /* Should have run exactly to end of extra data. */
@@ -203,21 +169,21 @@ DEFINE_TEST(test_write_format_zip_file_z
 
        /* After Central dir, we find Zip64 eocd and Zip64 eocd locator. */
        assertEqualMem(p, "PK\006\006", 4); /* Zip64 eocd */
-       assertEqualInt(i8(p + 4), 44); /* We're using v1 Zip64 eocd */
-       assertEqualInt(i2(p + 12), 45); /* Written by Version 4.5 */
-       assertEqualInt(i2(p + 14), 45); /* Needs version 4.5 to extract */
-       assertEqualInt(i4(p + 16), 0); /* This is disk #0 */
-       assertEqualInt(i4(p + 20), 0); /* Dir starts on disk #0 */
-       assertEqualInt(i8(p + 24), 1); /* 1 entry on this disk */
-       assertEqualInt(i8(p + 32), 1); /* 1 entry total */
-       assertEqualInt(i8(p + 40), eocd - central_header); /* size of cd */
-       assertEqualInt(i8(p + 48), central_header - buff); /* start of cd */
-       p += 12 + i8(p + 4);
+       assertEqualInt(i8le(p + 4), 44); /* We're using v1 Zip64 eocd */
+       assertEqualInt(i2le(p + 12), 45); /* Written by Version 4.5 */
+       assertEqualInt(i2le(p + 14), 45); /* Needs version 4.5 to extract */
+       assertEqualInt(i4le(p + 16), 0); /* This is disk #0 */
+       assertEqualInt(i4le(p + 20), 0); /* Dir starts on disk #0 */
+       assertEqualInt(i8le(p + 24), 1); /* 1 entry on this disk */
+       assertEqualInt(i8le(p + 32), 1); /* 1 entry total */
+       assertEqualInt(i8le(p + 40), eocd - central_header); /* size of cd */
+       assertEqualInt(i8le(p + 48), central_header - buff); /* start of cd */
+       p += 12 + i8le(p + 4);
 
        assertEqualMem(p, "PK\006\007", 4); /* Zip64 eocd locator */
-       assertEqualInt(i4(p + 4), 0); /* Zip64 eocd is on disk #0 */
-       assertEqualInt(i8(p + 8), eocd - buff); /* Offset of Zip64 eocd */
-       assertEqualInt(i4(p + 16), 1); /* 1 disk */
+       assertEqualInt(i4le(p + 4), 0); /* Zip64 eocd is on disk #0 */
+       assertEqualInt(i8le(p + 8), eocd - buff); /* Offset of Zip64 eocd */
+       assertEqualInt(i4le(p + 16), 1); /* 1 disk */
        p += 20;
 
        /* Regular EOCD immediately follows Zip64 records. */
@@ -226,48 +192,48 @@ DEFINE_TEST(test_write_format_zip_file_z
        /* Verify local header of file entry. */
        p = local_header = buff;
        assertEqualMem(p, "PK\003\004", 4); /* Signature */
-       assertEqualInt(i2(p + 4), zip_version); /* Version needed to extract */
-       assertEqualInt(i2(p + 6), 8); /* Flags: bit 3 = length-at-end */
-       assertEqualInt(i2(p + 8), zip_compression); /* Compression method */
-       assertEqualInt(i2(p + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
-       assertEqualInt(i2(p + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
-       assertEqualInt(i4(p + 14), 0); /* CRC-32 must be 0 because of length-at-end */
-       assertEqualInt(i4(p + 18), 0); /* Compressed size must be 0 because of length-at-end */
-       assertEqualInt(i4(p + 22), 0); /* Uncompressed size must be 0 because of length-at-end. */
-       assertEqualInt(i2(p + 26), strlen(file_name)); /* Pathname length */
-       assertEqualInt(i2(p + 28), 37); /* Extra field length */
+       assertEqualInt(i2le(p + 4), zip_version); /* Version needed to extract */
+       assertEqualInt(i2le(p + 6), 8); /* Flags: bit 3 = length-at-end */
+       assertEqualInt(i2le(p + 8), zip_compression); /* Compression method */
+       assertEqualInt(i2le(p + 10), (tm->tm_hour * 2048) + (tm->tm_min * 32) + (tm->tm_sec / 2)); /* File time */
+       assertEqualInt(i2le(p + 12), ((tm->tm_year - 80) * 512) + ((tm->tm_mon + 1) * 32) + tm->tm_mday); /* File date */
+       assertEqualInt(i4le(p + 14), 0); /* CRC-32 must be 0 because of length-at-end */
+       assertEqualInt(i4le(p + 18), 0); /* Compressed size must be 0 because of length-at-end */
+       assertEqualInt(i4le(p + 22), 0); /* Uncompressed size must be 0 because of length-at-end. */
+       assertEqualInt(i2le(p + 26), strlen(file_name)); /* Pathname length */
+       assertEqualInt(i2le(p + 28), 37); /* Extra field length */
        assertEqualMem(p + 30, file_name, strlen(file_name)); /* Pathname */
        p = extension_start = local_header + 30 + strlen(file_name);
-       extension_end = extension_start + i2(local_header + 28);
+       extension_end = extension_start + i2le(local_header + 28);
 
-       assertEqualInt(i2(p), 0x7875);  /* 'ux' extension header */
-       assertEqualInt(i2(p + 2), 11); /* 'ux' size */
+       assertEqualInt(i2le(p), 0x7875);  /* 'ux' extension header */
+       assertEqualInt(i2le(p + 2), 11); /* 'ux' size */
        assertEqualInt(p[4], 1); /* 'ux' version */
        assertEqualInt(p[5], 4); /* 'ux' uid size */
-       assertEqualInt(i4(p + 6), file_uid); /* 'Ux' UID */
+       assertEqualInt(i4le(p + 6), file_uid); /* 'Ux' UID */
        assertEqualInt(p[10], 4); /* 'ux' gid size */
-       assertEqualInt(i4(p + 11), file_gid); /* 'Ux' GID */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i4le(p + 11), file_gid); /* 'Ux' GID */
+       p += 4 + i2le(p + 2);
 
-       assertEqualInt(i2(p), 0x5455);  /* 'UT' extension header */
-       assertEqualInt(i2(p + 2), 5); /* 'UT' size */
+       assertEqualInt(i2le(p), 0x5455);  /* 'UT' extension header */
+       assertEqualInt(i2le(p + 2), 5); /* 'UT' size */
        assertEqualInt(p[4], 1); /* 'UT' flags */
-       assertEqualInt(i4(p + 5), t); /* 'UT' mtime */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i4le(p + 5), t); /* 'UT' mtime */
+       p += 4 + i2le(p + 2);
 
-       assertEqualInt(i2(p), 0x6c78); /* 'xl' experimental extension header */
-       assertEqualInt(i2(p + 2), 9); /* size */
+       assertEqualInt(i2le(p), 0x6c78); /* 'xl' experimental extension header */
+       assertEqualInt(i2le(p + 2), 9); /* size */
        assertEqualInt(p[4], 7); /* bitmap of included fields */
-       assertEqualInt(i2(p + 5) >> 8, 3); /* system & version made by */
-       assertEqualInt(i2(p + 7), 0); /* internal file attributes */
-       assertEqualInt(i4(p + 9) >> 16 & 01777, file_perm); /* external file attributes */
-       p += 4 + i2(p + 2);
+       assertEqualInt(i2le(p + 5) >> 8, 3); /* system & version made by */
+       assertEqualInt(i2le(p + 7), 0); /* internal file attributes */
+       assertEqualInt(i4le(p + 9) >> 16 & 01777, file_perm); /* external file attributes */
+       p += 4 + i2le(p + 2);
 
        /* Just in case: Report any extra extensions. */
        while (p < extension_end) {
-               failure("Unexpected extension 0x%04X", i2(p));
+               failure("Unexpected extension 0x%04X", i2le(p));
                assert(0);
-               p += 4 + i2(p + 2);
+               p += 4 + i2le(p + 2);
        }
 
        /* Should have run exactly to end of extra data. */
@@ -277,9 +243,9 @@ DEFINE_TEST(test_write_format_zip_file_z
        while (p < central_header && memcmp(p, "PK\007\010", 4) != 0)
                ++p;
        assertEqualMem(p, "PK\007\010", 4);
-       assertEqualInt(i4(p + 4), crc); /* CRC-32 */
-       assertEqualInt(i8(p + 8), p - extension_end); /* compressed size */
-       assertEqualInt(i8(p + 16), sizeof(file_data)); /* uncompressed size */
+       assertEqualInt(i4le(p + 4), crc); /* CRC-32 */
+       assertEqualInt(i8le(p + 8), p - extension_end); /* compressed size */
+       assertEqualInt(i8le(p + 16), sizeof(file_data)); /* uncompressed size */
 
        /* Central directory should immediately follow the only entry. */
        assertEqualAddress(p + 24, central_header);

Index: pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt
diff -u pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt:1.4 pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt:1.5
--- pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt:1.4    Sat Oct 19 05:40:00 2024
+++ pkgsrc/archivers/libarchive/files/tar/CMakeLists.txt        Wed May 21 15:25:52 2025
@@ -46,8 +46,10 @@ IF(ENABLE_TAR)
   ENDIF(ENABLE_TAR_SHARED)
 
   # Installation rules
-  INSTALL(TARGETS bsdtar RUNTIME DESTINATION bin)
-  INSTALL_MAN(${bsdtar_MANS})
+  IF(ENABLE_INSTALL)
+    INSTALL(TARGETS bsdtar RUNTIME DESTINATION bin)
+    INSTALL_MAN(${bsdtar_MANS})
+  ENDIF(ENABLE_INSTALL)
 ENDIF(ENABLE_TAR)
 
 add_subdirectory(test)

Index: pkgsrc/archivers/libarchive/files/tar/bsdtar.1
diff -u pkgsrc/archivers/libarchive/files/tar/bsdtar.1:1.16 pkgsrc/archivers/libarchive/files/tar/bsdtar.1:1.17
--- pkgsrc/archivers/libarchive/files/tar/bsdtar.1:1.16 Mon Apr 28 10:31:35 2025
+++ pkgsrc/archivers/libarchive/files/tar/bsdtar.1      Wed May 21 15:25:52 2025
@@ -196,6 +196,11 @@ but before extracting entries from the a
 to the current directory after processing any
 .Fl C
 options and before extracting any files.
+.It Fl Fl clamp-mtime
+(use with
+.Fl Fl mtime )
+Only set the modification time if the file is newer than the date specified in
+.Fl Fl mtime .
 .It Fl Fl clear-nochange-fflags
 (x mode only)
 Before removing file system objects to replace them, clear platform-specific
@@ -416,6 +421,9 @@ is run in x mode as root.
 Currently supported only for pax formats
 .Po including "pax restricted", the default tar format for
 .Nm bsdtar Pc
+.It Fl Fl mtime Ar date
+(c, r, u modes only)
+Set the modification times of added files to the specified date.
 .It Fl n , Fl Fl norecurse , Fl Fl no-recursion
 Do not operate recursively on the content of directories.
 .It Fl Fl newer Ar date
@@ -472,7 +480,7 @@ and the default behavior if
 .Nm
 is run as non-root in x mode.
 .It Fl Fl no-mac-metadata
-(x mode only)
+(c, r, u and x mode only)
 Mac OS X specific.
 Do not archive or extract ACLs and extended file attributes
 using
Index: pkgsrc/archivers/libarchive/files/tar/bsdtar.c
diff -u pkgsrc/archivers/libarchive/files/tar/bsdtar.c:1.16 pkgsrc/archivers/libarchive/files/tar/bsdtar.c:1.17
--- pkgsrc/archivers/libarchive/files/tar/bsdtar.c:1.16 Mon Apr 28 10:31:35 2025
+++ pkgsrc/archivers/libarchive/files/tar/bsdtar.c      Wed May 21 15:25:52 2025
@@ -104,7 +104,7 @@ need_report(void)
 static __LA_NORETURN void               long_help(void);
 static void             only_mode(struct bsdtar *, const char *opt,
                             const char *valid);
-static void             set_mode(struct bsdtar *, char opt);
+static void             set_mode(struct bsdtar *, int opt);
 static __LA_NORETURN void               version(void);
 
 /* A basic set of security flags to request from libarchive. */
@@ -139,13 +139,14 @@ main(int argc, char **argv)
 {
        struct bsdtar           *bsdtar, bsdtar_storage;
        int                      opt, t;
-       char                     compression, compression2;
+       int                      compression, compression2;
        const char              *compression_name, *compression2_name;
        const char              *compress_program;
        char                    *tptr, *uptr;
        char                     possible_help_request;
        char                     buff[16];
        long                     l;
+       time_t                  now;
 
        /*
         * Use a pointer for consistency, but stack-allocated storage
@@ -160,6 +161,7 @@ main(int argc, char **argv)
        compression = compression2 = '\0';
        compression_name = compression2_name = NULL;
        compress_program = NULL;
+       time(&now);
 
 #if defined(HAVE_SIGACTION)
        { /* Set up signal handling. */
@@ -676,6 +678,16 @@ main(int argc, char **argv)
                                }
                        }
                        break;
+               case OPTION_MTIME: /* GNU tar */
+                       bsdtar->has_mtime = 1;
+                       bsdtar->mtime = archive_parse_date(now, bsdtar->argument);
+                       if (bsdtar->mtime == (time_t)-1) {
+                               lafe_errc(1, 0, "Invalid argument to --mtime (bad date string)");
+                       }
+                       break;
+               case OPTION_CLAMP_MTIME: /* GNU tar */
+                       bsdtar->clamp_mtime = 1;
+                       break;
 #if 0
                /*
                 * The common BSD -P option is not necessary, since
@@ -743,6 +755,8 @@ main(int argc, char **argv)
                        bsdtar->strip_components = (int)l;
                        break;
                case 'T': /* GNU tar */
+                       if (bsdtar->names_from_file)
+                               lafe_errc(1, 0, "Multiple --files-from/-T options are not supported");
                        bsdtar->names_from_file = bsdtar->argument;
                        break;
                case 't': /* SUSv2 */
@@ -938,7 +952,7 @@ main(int argc, char **argv)
                switch (compression) {
                case 'J': case 'j': case 'y': case 'Z': case 'z':
                        strcpy(buff, "-?");
-                       buff[1] = compression;
+                       buff[1] = (char)compression;
                        break;
                default:
                        strcpy(buff, "--");
@@ -962,6 +976,10 @@ main(int argc, char **argv)
                only_mode(bsdtar, buff, "cru");
        }
 
+       if (!bsdtar->has_mtime && bsdtar->clamp_mtime)
+               lafe_errc(1, 0,
+                   "--clamp-mtime is not valid without --mtime <date>");
+
        /*
         * When creating an archive from a directory tree, the directory
         * walking code will already avoid entering directories when
@@ -1008,7 +1026,7 @@ main(int argc, char **argv)
 }
 
 static void
-set_mode(struct bsdtar *bsdtar, char opt)
+set_mode(struct bsdtar *bsdtar, int opt)
 {
        if (bsdtar->mode != '\0' && bsdtar->mode != opt)
                lafe_errc(1, 0,
@@ -1066,6 +1084,8 @@ static const char *long_help_msg =
        "  -z, -j, -J, --lzma  Compress archive with gzip/bzip2/xz/lzma\n"
        "  --format {ustar|pax|cpio|shar}  Select archive format\n"
        "  --exclude <pattern>  Skip files that match pattern\n"
+       "  --mtime <date>  Set modification times for added files\n"
+       "  --clamp-mtime   Only set modification times for files newer than --mtime\n"
        "  -C <dir>  Change to <dir> before processing remaining files\n"
        "  @<archive>  Add entries from <archive> to output\n"
        "List: %p -t [options] [<patterns>]\n"

Index: pkgsrc/archivers/libarchive/files/tar/bsdtar.h
diff -u pkgsrc/archivers/libarchive/files/tar/bsdtar.h:1.13 pkgsrc/archivers/libarchive/files/tar/bsdtar.h:1.14
--- pkgsrc/archivers/libarchive/files/tar/bsdtar.h:1.13 Sat Oct 19 05:40:00 2024
+++ pkgsrc/archivers/libarchive/files/tar/bsdtar.h      Wed May 21 15:25:52 2025
@@ -42,10 +42,13 @@ struct bsdtar {
        int               uid;  /* --uid */
        const char       *uname; /* --uname */
        const char       *passphrase; /* --passphrase */
-       char              mode; /* Program mode: 'c', 't', 'r', 'u', 'x' */
+       int               mode; /* Program mode: 'c', 't', 'r', 'u', 'x' */
        char              symlink_mode; /* H or L, per BSD conventions */
        const char       *option_options; /* --options */
        char              day_first; /* show day before month in -tv output */
+       char            has_mtime; /* --mtime exists (0 or 1) */
+       char            clamp_mtime; /* --clamp-mtime (0 or 1)*/
+       time_t          mtime; /* --mtime */
        struct creation_set *cset;
 
        /* Option parser state */
@@ -114,7 +117,7 @@ struct bsdtar {
 
 /* Fake short equivalents for long options that otherwise lack them. */
 enum {
-       OPTION_ACLS = 1,
+       OPTION_ACLS = 256,
        OPTION_B64ENCODE,
        OPTION_CHECK_LINKS,
        OPTION_CHROOT,
@@ -175,14 +178,17 @@ enum {
        OPTION_VERSION,
        OPTION_XATTRS,
        OPTION_ZSTD,
+       OPTION_MTIME,
+       OPTION_CLAMP_MTIME,
 };
 
 int    bsdtar_getopt(struct bsdtar *);
 void   do_chdir(struct bsdtar *);
 int    edit_pathname(struct bsdtar *, struct archive_entry *);
+void   edit_mtime(struct bsdtar *, struct archive_entry *);
 int    need_report(void);
 int    pathcmp(const char *a, const char *b);
-void   safe_fprintf(FILE *, const char *fmt, ...) __LA_PRINTF(2, 3);
+void   safe_fprintf(FILE * restrict, const char * restrict fmt, ...) __LA_PRINTF(2, 3);
 void   set_chdir(struct bsdtar *, const char *newdir);
 const char *tar_i64toa(int64_t);
 void   tar_mode_c(struct bsdtar *bsdtar);

Index: pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h
diff -u pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h:1.5 pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h:1.6
--- pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h:1.5  Sat Oct 19 05:40:00 2024
+++ pkgsrc/archivers/libarchive/files/tar/bsdtar_windows.h      Wed May 21 15:25:52 2025
@@ -43,4 +43,4 @@ int __tar_chdir(const char *);
 
 #endif
 
-#endif /* BSDTAR_WINDOWS_H */
+#endif /* !BSDTAR_WINDOWS_H */

Index: pkgsrc/archivers/libarchive/files/tar/cmdline.c
diff -u pkgsrc/archivers/libarchive/files/tar/cmdline.c:1.11 pkgsrc/archivers/libarchive/files/tar/cmdline.c:1.12
--- pkgsrc/archivers/libarchive/files/tar/cmdline.c:1.11        Sat Oct 19 05:40:00 2024
+++ pkgsrc/archivers/libarchive/files/tar/cmdline.c     Wed May 21 15:25:52 2025
@@ -57,6 +57,7 @@ static const struct bsdtar_option {
        { "cd",                   1, 'C' },
        { "check-links",          0, OPTION_CHECK_LINKS },
        { "chroot",               0, OPTION_CHROOT },
+       { "clamp-mtime",          0, OPTION_CLAMP_MTIME },
        { "clear-nochange-fflags", 0, OPTION_CLEAR_NOCHANGE_FFLAGS },
        { "compress",             0, 'Z' },
        { "confirmation",         0, 'w' },
@@ -95,6 +96,7 @@ static const struct bsdtar_option {
        { "lzop",                 0, OPTION_LZOP },
        { "mac-metadata",         0, OPTION_MAC_METADATA },
        { "modification-time",    0, 'm' },
+       { "mtime",                1, OPTION_MTIME },
        { "newer",                1, OPTION_NEWER_CTIME },
        { "newer-ctime",          1, OPTION_NEWER_CTIME },
        { "newer-ctime-than",     1, OPTION_NEWER_CTIME_THAN },

Index: pkgsrc/archivers/libarchive/files/tar/util.c
diff -u pkgsrc/archivers/libarchive/files/tar/util.c:1.12 pkgsrc/archivers/libarchive/files/tar/util.c:1.13
--- pkgsrc/archivers/libarchive/files/tar/util.c:1.12   Mon Apr 28 10:31:35 2025
+++ pkgsrc/archivers/libarchive/files/tar/util.c        Wed May 21 15:25:52 2025
@@ -67,26 +67,26 @@ static const char *strip_components(cons
  * malloc()), partly out of expedience (we have to call vsnprintf()
  * before malloc() anyway to find out how big a buffer we need; we may
  * as well point that first call at a small local buffer in case it
- * works), but mostly for safety (so we can use this to print messages
- * about out-of-memory conditions).
+ * works).
  */
 
 void
-safe_fprintf(FILE *f, const char *fmt, ...)
+safe_fprintf(FILE * restrict f, const char * restrict fmt, ...)
 {
        char fmtbuff_stack[256]; /* Place to format the printf() string. */
        char outbuff[256]; /* Buffer for outgoing characters. */
        char *fmtbuff_heap; /* If fmtbuff_stack is too small, we use malloc */
        char *fmtbuff;  /* Pointer to fmtbuff_stack or fmtbuff_heap. */
-       int fmtbuff_length;
+       size_t fmtbuff_length;
        int length, n;
        va_list ap;
        const char *p;
-       unsigned i;
+       size_t i;
        wchar_t wc;
        char try_wc;
 
        /* Use a stack-allocated buffer if we can, for speed and safety. */
+       memset(fmtbuff_stack, '\0', sizeof(fmtbuff_stack));
        fmtbuff_heap = NULL;
        fmtbuff_length = sizeof(fmtbuff_stack);
        fmtbuff = fmtbuff_stack;
@@ -96,17 +96,21 @@ safe_fprintf(FILE *f, const char *fmt, .
        length = vsnprintf(fmtbuff, fmtbuff_length, fmt, ap);
        va_end(ap);
 
+       /* If vsnprintf will always fail, stop early. */
+       if (length < 0 && errno == EOVERFLOW)
+               return;
+
        /* If the result was too large, allocate a buffer on the heap. */
-       while (length < 0 || length >= fmtbuff_length) {
-               if (length >= fmtbuff_length)
-                       fmtbuff_length = length+1;
+       while (length < 0 || (size_t)length >= fmtbuff_length) {
+               if (length >= 0 && (size_t)length >= fmtbuff_length)
+                       fmtbuff_length = (size_t)length + 1;
                else if (fmtbuff_length < 8192)
                        fmtbuff_length *= 2;
                else if (fmtbuff_length < 1000000)
                        fmtbuff_length += fmtbuff_length / 4;
                else {
-                       length = fmtbuff_length;
-                       fmtbuff_heap[length-1] = '\0';
+                       fmtbuff[fmtbuff_length - 1] = '\0';
+                       length = (int)strlen(fmtbuff);
                        break;
                }
                free(fmtbuff_heap);
@@ -121,8 +125,9 @@ safe_fprintf(FILE *f, const char *fmt, .
                } else {
                        /* Leave fmtbuff pointing to the truncated
                         * string in fmtbuff_stack. */
+                       fmtbuff_stack[sizeof(fmtbuff_stack) - 1] = '\0';
                        fmtbuff = fmtbuff_stack;
-                       length = sizeof(fmtbuff_stack) - 1;
+                       length = (int)strlen(fmtbuff);
                        break;
                }
        }
@@ -153,13 +158,13 @@ safe_fprintf(FILE *f, const char *fmt, .
                        } else {
                                /* Not printable, format the bytes. */
                                while (n-- > 0)
-                                       i += (unsigned)bsdtar_expand_char(
+                                       i += bsdtar_expand_char(
                                            outbuff, sizeof(outbuff), i, *p++);
                        }
                } else {
                        /* After any conversion failure, don't bother
                         * trying to convert the rest. */
-                       i += (unsigned)bsdtar_expand_char(outbuff, sizeof(outbuff), i, *p++);
+                       i += bsdtar_expand_char(outbuff, sizeof(outbuff), i, *p++);
                        try_wc = 0;
                }
 
@@ -563,6 +568,20 @@ edit_pathname(struct bsdtar *bsdtar, str
 }
 
 /*
+ * Apply --mtime and --clamp-mtime options.
+ */
+void
+edit_mtime(struct bsdtar *bsdtar, struct archive_entry *entry)
+{
+       if (!bsdtar->has_mtime)
+               return;
+
+       __LA_TIME_T entry_mtime = archive_entry_mtime(entry);
+       if (!bsdtar->clamp_mtime || entry_mtime > bsdtar->mtime)
+               archive_entry_set_mtime(entry, bsdtar->mtime, 0);
+}
+
+/*
  * It would be nice to just use printf() for formatting large numbers,
  * but the compatibility problems are quite a headache.  Hence the
  * following simple utility function.

Index: pkgsrc/archivers/libarchive/files/tar/write.c
diff -u pkgsrc/archivers/libarchive/files/tar/write.c:1.15 pkgsrc/archivers/libarchive/files/tar/write.c:1.16
--- pkgsrc/archivers/libarchive/files/tar/write.c:1.15  Sat Oct 19 05:40:00 2024
+++ pkgsrc/archivers/libarchive/files/tar/write.c       Wed May 21 15:25:52 2025
@@ -682,6 +682,7 @@ append_archive(struct bsdtar *bsdtar, st
                if ((bsdtar->flags & OPTFLAG_INTERACTIVE) &&
                    !yes("copy '%s'", archive_entry_pathname(in_entry)))
                        continue;
+               edit_mtime(bsdtar, in_entry);
                if (bsdtar->verbose > 1) {
                        safe_fprintf(stderr, "a ");
                        list_item_verbose(bsdtar, stderr, in_entry);
@@ -908,6 +909,9 @@ write_hierarchy(struct bsdtar *bsdtar, s
                if (edit_pathname(bsdtar, entry))
                        continue;
 
+               /* Rewrite the mtime. */
+               edit_mtime(bsdtar, entry);
+
                /* Display entry as we process it. */
                if (bsdtar->verbose > 1) {
                        safe_fprintf(stderr, "a ");

Index: pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt
diff -u pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt:1.12 pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt:1.13
--- pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt:1.12      Mon Apr 28 10:31:35 2025
+++ pkgsrc/archivers/libarchive/files/tar/test/CMakeLists.txt   Wed May 21 15:25:52 2025
@@ -58,6 +58,7 @@ IF(ENABLE_TAR AND ENABLE_TEST)
     test_option_lz4.c
     test_option_lzma.c
     test_option_lzop.c
+    test_option_mtime.c
     test_option_n.c
     test_option_newer_than.c
     test_option_nodump.c

Index: pkgsrc/archivers/libarchive/files/tar/test/list.h
diff -u pkgsrc/archivers/libarchive/files/tar/test/list.h:1.11 pkgsrc/archivers/libarchive/files/tar/test/list.h:1.12
--- pkgsrc/archivers/libarchive/files/tar/test/list.h:1.11      Mon Apr 28 10:31:35 2025
+++ pkgsrc/archivers/libarchive/files/tar/test/list.h   Wed May 21 15:25:52 2025
@@ -49,6 +49,7 @@ DEFINE_TEST(test_option_lrzip)
 DEFINE_TEST(test_option_lz4)
 DEFINE_TEST(test_option_lzma)
 DEFINE_TEST(test_option_lzop)
+DEFINE_TEST(test_option_mtime)
 DEFINE_TEST(test_option_n)
 DEFINE_TEST(test_option_newer_than)
 DEFINE_TEST(test_option_nodump)

Index: pkgsrc/archivers/libarchive/files/test_utils/test_common.h
diff -u pkgsrc/archivers/libarchive/files/test_utils/test_common.h:1.11 pkgsrc/archivers/libarchive/files/test_utils/test_common.h:1.12
--- pkgsrc/archivers/libarchive/files/test_utils/test_common.h:1.11     Sat Oct 19 05:40:01 2024
+++ pkgsrc/archivers/libarchive/files/test_utils/test_common.h  Wed May 21 15:25:52 2025
@@ -467,4 +467,4 @@ void assertVersion(const char *prog, con
 
 #include "test_utils.h"
 
-#endif /* TEST_COMMON_H */
+#endif /* !TEST_COMMON_H */

Index: pkgsrc/archivers/libarchive/files/test_utils/test_main.c
diff -u pkgsrc/archivers/libarchive/files/test_utils/test_main.c:1.9 pkgsrc/archivers/libarchive/files/test_utils/test_main.c:1.10
--- pkgsrc/archivers/libarchive/files/test_utils/test_main.c:1.9        Mon Apr 28 10:31:35 2025
+++ pkgsrc/archivers/libarchive/files/test_utils/test_main.c    Wed May 21 15:25:52 2025
@@ -3565,9 +3565,10 @@ test_run(int i, const char *tmpdir)
 #else
        char workdir[1024 * 2];
 #endif
-       char logfilename[64];
+       char logfilename[256];
        int failures_before = failures;
        int skips_before = skips;
+       int tmp;
        mode_t oldumask;
 
        switch (verbosity) {
@@ -3588,11 +3589,38 @@ test_run(int i, const char *tmpdir)
                exit(1);
        }
        /* Create a log file for this test. */
-       snprintf(logfilename, sizeof(logfilename), "%s.log", tests[i].name);
+       tmp = snprintf(logfilename, sizeof(logfilename), "%s.log", tests[i].name);
+       if (tmp < 0) {
+               fprintf(stderr,
+                       "ERROR can't create %s.log: %s\n",
+                       tests[i].name, strerror(errno));
+               exit(1);
+       }
+       if ((size_t)tmp >= sizeof(logfilename)) {
+               fprintf(stderr,
+                       "ERROR can't create %s.log: Name too long. "
+                               "Length %d; Max allowed length %zu\n",
+                       tests[i].name, tmp, sizeof(logfilename) - 1);
+               exit(1);
+       }
        logfile = fopen(logfilename, "w");
        fprintf(logfile, "%s\n\n", tests[i].name);
        /* Chdir() to a work dir for this specific test. */
-       snprintf(workdir, sizeof(workdir), "%s/%s", tmpdir, tests[i].name);
+       tmp = snprintf(workdir,
+               sizeof(workdir), "%s/%s", tmpdir, tests[i].name);
+       if (tmp < 0) {
+               fprintf(stderr,
+                       "ERROR can't create %s/%s: %s\n",
+                       tmpdir, tests[i].name, strerror(errno));
+               exit(1);
+       }
+       if ((size_t)tmp >= sizeof(workdir)) {
+               fprintf(stderr,
+                       "ERROR can't create %s/%s: Path too long. "
+                       "Length %d; Max allowed length %zu\n",
+                       tmpdir, tests[i].name, tmp, sizeof(workdir) - 1);
+               exit(1);
+       }
        testworkdir = workdir;
        if (!assertMakeDir(testworkdir, 0755)
            || !assertChdir(testworkdir)) {

Index: pkgsrc/archivers/libarchive/files/test_utils/test_utils.c
diff -u pkgsrc/archivers/libarchive/files/test_utils/test_utils.c:1.2 pkgsrc/archivers/libarchive/files/test_utils/test_utils.c:1.3
--- pkgsrc/archivers/libarchive/files/test_utils/test_utils.c:1.2       Thu Jan 18 18:00:21 2024
+++ pkgsrc/archivers/libarchive/files/test_utils/test_utils.c   Wed May 21 15:25:52 2025
@@ -109,3 +109,51 @@ fill_with_pseudorandom_data(void *buffer
        }
        fill_with_pseudorandom_data_seed(seed, buffer, size);
 }
+
+unsigned long
+bitcrc32(unsigned long c, const void *_p, size_t s)
+{
+       /* This is a drop-in replacement for crc32() from zlib.
+        * Libarchive should be able to correctly read archives (including
+        * correct CRCs) even when zlib is unavailable, and this function
+        * helps us verify that. Yes, this is very, very slow and unsuitable
+        * for production use, but it's obviously correct, compact, and
+        * works well enough for this particular usage. Libarchive
+        * internally uses a much more efficient implementation if zlib is
+        * unavailable. */
+       const unsigned char *p = _p;
+       char bitctr;
+
+       if (p == NULL)
+               return (0);
+
+       for (; s > 0; --s) {
+               c ^= *p++;
+               for (bitctr = 8; bitctr > 0; --bitctr) {
+                       if (c & 1) c = (c >> 1);
+                       else       c = (c >> 1) ^ 0xedb88320;
+                       c ^= 0x80000000;
+               }
+       }
+       return (c);
+}
+
+/* Read little-endian integers */
+unsigned short
+i2le(const void* p_)
+{
+       const unsigned char *p = p_;
+       return (p[0] | (p[1] << 8));
+}
+unsigned int
+i4le(const void* p_)
+{
+       const char *p = p_;
+       return (i2le(p) | (i2le(p + 2) << 16));
+}
+unsigned long long
+i8le(const void* p_)
+{
+       const char *p = p_;
+       return (i4le(p) | ((unsigned long long)i4le(p + 4) << 32));
+}
Index: pkgsrc/archivers/libarchive/files/test_utils/test_utils.h
diff -u pkgsrc/archivers/libarchive/files/test_utils/test_utils.h:1.2 pkgsrc/archivers/libarchive/files/test_utils/test_utils.h:1.3
--- pkgsrc/archivers/libarchive/files/test_utils/test_utils.h:1.2       Thu Jan 18 18:00:21 2024
+++ pkgsrc/archivers/libarchive/files/test_utils/test_utils.h   Wed May 21 15:25:52 2025
@@ -31,6 +31,11 @@
 #include <stdint.h>
 
 /* Fill a buffer with pseudorandom data */
-void fill_with_pseudorandom_data(void* buffer, size_t size);
-
-#endif /* TEST_UTILS_H */
+void fill_with_pseudorandom_data(void*, size_t);
+/* A simplistic CRC-32 function for testing purposes */
+unsigned long bitcrc32(unsigned long, const void*, size_t);
+/* Read little-endian integers */
+unsigned short i2le(const void*);
+unsigned int i4le(const void*);
+unsigned long long i8le(const void*);
+#endif /* !TEST_UTILS_H */

Index: pkgsrc/archivers/libarchive/files/unzip/bsdunzip.c
diff -u pkgsrc/archivers/libarchive/files/unzip/bsdunzip.c:1.7 pkgsrc/archivers/libarchive/files/unzip/bsdunzip.c:1.8
--- pkgsrc/archivers/libarchive/files/unzip/bsdunzip.c:1.7      Mon Apr 28 10:31:35 2025
+++ pkgsrc/archivers/libarchive/files/unzip/bsdunzip.c  Wed May 21 15:25:52 2025
@@ -111,7 +111,7 @@ static int noeol;
 static char *passphrase_buf;
 
 /* fatal error message + errno */
-static void
+static void __LA_NORETURN
 error(const char *fmt, ...)
 {
        va_list ap;
@@ -128,7 +128,7 @@ error(const char *fmt, ...)
 }
 
 /* fatal error message, no errno */
-static void
+static void __LA_NORETURN
 errorx(const char *fmt, ...)
 {
        va_list ap;
@@ -233,7 +233,7 @@ pathdup(const char *path)
        }
        if (L_opt) {
                for (i = 0; i < len; ++i)
-                       str[i] = tolower((unsigned char)path[i]);
+                       str[i] = (char)tolower((unsigned char)path[i]);
        } else {
                memcpy(str, path, len);
        }



Home | Main Index | Thread Index | Old Index