371 Commits

Author SHA1 Message Date
Martin Matuska
dd897a78c6 Release 3.8.5 2026-01-05 10:49:24 +01:00
Martin Matuska
d114ceee6d Release 3.8.4 2025-12-01 13:39:19 +01:00
Martin Matuška
7d94cdaf66 Merge pull request #2800 from mmatuska/fix/freebsdci
CI: use gmake in Cirrus FreeBSD build
(cherry picked from commit 728b43c0c18df60c3e9239fb03c69bd2b1b85ebc)
2025-12-01 13:32:53 +01:00
Martin Matuska
1368b08875 Release 3.8.3 2025-11-17 20:39:55 +01:00
Martin Matuska
7f53fce04e Release 3.8.2 2025-10-15 23:36:59 +02:00
Martin Matuška
dc6ea847e1 Merge pull request #2731 from mmatuska/fix/macosci
CI: add workaround for cmake installed from local/pinned tab on GH/MacOS
(cherry picked from commit 38debf6be13046b16abf0ec31349d7298b33280e)
2025-09-23 22:59:45 +02:00
Tim Kientzle
f162db9618 Merge pull request #2707 from fdegros/close_range_support
Avoid leaking file descriptors into subprocesses

(cherry picked from commit ab4d21e4cb1124d71232f81b33b2738d93c97b5a)
2025-09-23 22:58:40 +02:00
Tim Kientzle
31b219bffa Merge pull request #2712 from KlaraSystems/des/readdir_r
Drop support for readdir_r()

(cherry picked from commit 3bf1035e67404bb1ef869f1351382f89ab23a198)
2025-09-23 22:57:46 +02:00
Martin Matuska
9525f90ca4 Release 3.8.1 2025-06-01 21:26:44 +02:00
Tim Kientzle
97a48a0d79 Merge pull request #2509 from tesap/install-lib-dir
Make installation lib dir depend on CMAKE_INSTALL_LIBDIR variable

(cherry picked from commit 992734d6cc557e3387f9cfd44a0cca3934d22262)
2025-05-31 21:25:32 +02:00
Mostyn Bramley-Moore
d80d734190
Add some more error checking to shell scripts (#2617)
Exit immediately if a command exits with a non-zero status, and treat
unset variables as an error when substituting.
2025-05-20 10:14:17 +02:00
Mostyn Bramley-Moore
fe41cec3da
Remove long-unused travis CI script (#2615)
Support for travis CI was removed in 2019, this script hasn't been used
since.
2025-05-18 18:55:32 +02:00
Dustin L. Howett
16fd043f51
xar: add xmllite support to the XAR reader and writer (#2388)
This commit adds support for reading and writing XAR archives on Windows
using the built-in xmllite library. xmllite is present in all versions
of Windows starting with Windows XP.

With this change, no external XML library (libxml2, expat) is required
to read or produce XAR archives on Windows.

xmllite is a little bit annoying in that it's entirely a COM API--the
likes of which are annoying to use from C.

Signed-off-by: Dustin L. Howett <dustin@howett.net>
Depends on e619342dfa36b887ffa0ea33e98d04cb161cd7de
Closes #1811
2025-05-09 13:40:21 +02:00
Graham Percival
992a596290
Fix missing newline at EOF (#2577) 2025-04-11 20:10:04 -07:00
Lukas Javorsky
95c386317f
Remove unnecessary sharutils dependency (#2571)
Resolves issue: #2570
2025-04-08 20:23:27 -07:00
Peter Kokot
2c2266432f
CMake: Replace CMAKE_COMPILER_IS_GNUCC with CMAKE_C_COMPILER_ID (#2550)
Hello,

- The `CMAKE_COMPILER_IS_*` variables are deprecated and
`CMAKE_C_COMPILER_ID` can be used in this case instead.
- The legacy `endif()` command argument also simplified to avoid
repeating the condition.
2025-03-22 14:21:38 -07:00
ljdarj
52e0bfd750
archive_version_details' update (#2349)
Adding missing librairies to `archive_version_details()`'s output. I put
"system" if the library doesn't give a way to query its version and
"bundled" if there's a choice between the system copy of a library and a
bundled one and we took the bundled copy (Only one library in that case,
libb2. Maybe also xxhash in the future?).

I would have a question for the Windows specialists though: is there a
way to query the interface version of a CNG cryptographic provider?
Because I know of a way for Crypto API providers but I haven't found any
for CNG ones, despite `<bcrypt.h>` having an interface version
structure.

Fixes #2300.
2025-03-07 19:28:51 -08:00
Mostyn Bramley-Moore
819a50a043
Remove liblzmadec remnants (#2436)
It looks like support for this library was removed in 2016, but we still
had some unused cmake code and a dead preprocessor block.
2024-12-15 23:14:57 +01:00
Mostyn Bramley-Moore
ba76798136
ci: speed up windows/mingw build by using multiple make jobs (#2428)
This decreases the "Install library dependencies" step duration from
~4min to ~2min, and the "Build" step duration from ~10min to ~4min.
2024-12-07 16:39:46 -08:00
Mostyn Bramley-Moore
29802f6a5e
ci: make autoconf look for headers and libraries in /opt/homebrew if those directories exist (#2427)
Prior to this change, the ci autoconf jobs weren't looking for homebrew
headers or libraries unless pkg-config was used, so for example the
"MacOS (autotools)" ci job wasn't testing lz4 or zstd code.

Relates to #2426.
2024-12-07 15:11:19 -08:00
Mostyn Bramley-Moore
0bbbe2883e
ci: log bsdtar's version text, so we can see which support libraries were used (#2426)
A few of libarchive's CI jobs don't find all the local support libraries
that they could be using. This change makes it easier to see which of
them are used.
2024-12-07 15:10:42 -08:00
Mostyn Bramley-Moore
9b7540aaf1
ci: find liblzma >= 5.6.3 on windows msvc tests (#2421)
We currently use XZ Utils 5.6.3 on windows CI jobs, but the Windows
(msvc)
job which uses cmake seems to only be looking for the old library name,
liblzma.lib:

```
-- Looking for lzma_auto_decoder in C:/Program Files (x86)/xz/lib/liblzma.lib
-- Looking for lzma_auto_decoder in C:/Program Files (x86)/xz/lib/liblzma.lib - not found
-- Looking for lzma_easy_encoder in C:/Program Files (x86)/xz/lib/liblzma.lib
-- Looking for lzma_easy_encoder in C:/Program Files (x86)/xz/lib/liblzma.lib - not found
-- Looking for lzma_lzma_preset in C:/Program Files (x86)/xz/lib/liblzma.lib
-- Looking for lzma_lzma_preset in C:/Program Files (x86)/xz/lib/liblzma.lib - not found
-- Could NOT find LibLZMA (missing: LIBLZMA_HAS_AUTO_DECODER LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.6.3")
```

We need to update build/ci/github_actions/ci.cmd to look for lzma.lib
instead.
2024-12-06 19:56:06 -08:00
Julian Uy
819c5b01a9
Check for tcgetattr / tcsetattr before using it for readpassphrase implementation (#2424)
This is mainly for non-cygwin newlib platforms that don't have tcgetattr
/ tcsetattr implemented
2024-12-06 07:58:58 -08:00
Mostyn Bramley-Moore
84ad874530
Test with XZ Utils 5.6.3 on windows CI jobs (#2417)
This change fixes the autotools build to work with xz-utils 5.6.3, which
changed library names on windows, and fixes a couple of tests that I
noticed had dependencies on liblzma.
2024-12-02 00:29:46 +01:00
Mostyn Bramley-Moore
ae23713ceb
7zip writer: initial support for zstandard compression (#2137)
This is intended to be compatible with:
* https://github.com/mcmilk/7-Zip-zstd
* https://github.com/tehmul/p7zip-zstd
2024-10-22 11:01:55 +02:00
Mostyn Bramley-Moore
6567375f27
Reenable CI tests for MSVC (#2356)
These were disabled when migrating from Cirrus CI. Let's enable them for
github workflows, disable any failing tests on this configuration and
leave TODO notes to fix them.

This was the only failure that I found:
```
  684/764 Test #684: bsdtar_test_option_ignore_zeros_mode_c ...................................***Failed    0.10 sec
  
  If tests fail or crash, details will be in:
     C:\Users\RUNNER~1\AppData\Local\Temp/bsdtar_test.exe.2024-09-29T11.42.13-000
  
  Reference files will be read from: D:/a/libarchive/libarchive/tar/test
  Running tests on: "D:\a\libarchive\libarchive\build_ci\cmake\bin\Release\bsdtar.exe"
  Exercising: bsdtar 3.8.0 - libarchive 3.8.0dev zlib/1.3 liblzma/5.4.4 bz2lib/1.1.0 libzstd/1.5.5 
  
   39: test_option_ignore_zeros_mode_c
  D:\a\libarchive\libarchive\tar\test\test_option_ignore_zeros.c(99): File should be empty: test-c.err
      File size: 112
      Contents:
  0000 62 73 64 74 61 72 2e 65 78 65 3a 20 61 3a 20 43 bsdtar.exe: a: C
  0010 61 6e 27 74 20 74 72 61 6e 73 6c 61 74 65 20 75 an't translate u
  0020 6e 61 6d 65 20 27 28 6e 75 6c 6c 29 27 20 74 6f name '(null)' to
  0030 20 55 54 46 2d 38 0d 0a 62 73 64 74 61 72 2e 65  UTF-8..bsdtar.e
  0040 78 65 3a 20 62 3a 20 43 61 6e 27 74 20 74 72 61 xe: b: Can't tra
  0050 6e 73 6c 61 74 65 20 75 6e 61 6d 65 20 27 28 6e nslate uname '(n
  0060 75 6c 6c 29 27 20 74 6f 20 55 54 46 2d 38 0d 0a ull)' to UTF-8..
  
  Totals:
    Tests run:                1
    Tests failed:             1
    Assertions checked:      21
    Assertions failed:        1
    Skips reported:           0
```
2024-09-29 21:36:48 -07:00
Martin Matuska
915c9f83a4 Libarchive 3.8.0dev 2024-09-13 23:13:01 +02:00
Tim Kientzle
97c32b89b8
Try to fix some CI config issues on macOS (#2261)
macOS CI is reporting some warnings about unavailable versions of some
utilities. I'll take a stab at fixing those...
2024-07-06 09:46:21 +02:00
Sevan Janiyan
3f3b3efec2
Always use our supplied la_queue.h (#2222)
On legacy systems the OS supplied `sys/queue.h` may lack the required
macros, so to avoid having to verify if the version of queue.h is of
use, opt to always to `la_queue.h` which will match expectations.

Allows libarchive to build on legacy Darwin where `STAILQ_FOREACH` would
be missing from `sys/queue.h`.

Resolves #2220
2024-06-10 20:42:13 -07:00
Martin Matuska
9951b9cd25 Libarchive 3.7.5dev 2024-04-26 12:07:47 +02:00
Dag-Erling Smørgrav
3efcadf886 zstd: Implement core detection (#2083)
The bsdtar manual page claims that setting zstd:threads to 0 tells zstd
to use as many threads as there are cores in the system, but it actually
disables multi-threading.  Replace 0 with the number of configured
processors.

While here, add a previously missing overflow check.

Co-authored-by: Martin Matuska <martin@matuska.de>
2024-04-23 15:11:40 +02:00
Martin Matuska
a69a4537a6 CI: add libxml2 to MacOS test build 2024-04-23 11:51:53 +02:00
Martin Matuska
b3be94ba4f Libarchive 3.7.4dev 2024-04-08 12:17:17 +02:00
Tim Kientzle
771f434c90 build: use standard HAVE_ pattern for ZSTD compression check (#2111)
Follow-on to #1649: this just changes the name of the preprocessor macro
to use the standard pattern HAVE_<function name>

In particular: newer ZSTD implementations have a growing variety of
compression functions; the standard pattern will make it easier to
select among those someday.
2024-04-07 23:45:21 +02:00
Martin Matuska
04512b5b89 ci: use liblzma 1.5.5 in MSVC build until fix from upstream (#2105)
Signed-off-by: Duncan Horn
2024-04-01 19:44:24 +02:00
Alexandr Reshetnikov
2fb7b0ce45
bump zstd version: 1.5.5 -> 1.5.6 (#2099)
https://github.com/facebook/zstd/releases/tag/v1.5.6

https://github.com/facebook/zstd/issues/3999
2024-03-29 10:38:39 -07:00
Martin Matuska
2f4f9a7e4f CI: install mingw and set correct path 2023-12-10 01:01:28 +01:00
Mostyn Bramley-Moore
d1231a7ea7
Add support for PCRE2 (#2031)
The original PCRE is now end-of-life, and no longer actively maintained.

Implements #2013.
2023-12-09 23:56:53 +01:00
Brooks Davis
7dde502899
VCSid removal (#2017)
The libarchive source tree is littered with `__FBSDID("$FreeBSD.*")` and
'$FreeBSD$' tags left over from extracting it from FreeBSD's Subversion
repo. They never made sense for a git repo as git doesn't expand them
and FreeBSD has now removed `$FreeBSD$` from most local source files so
these stand out.

In addition to `__FBSDID` I've removed `__RCSID` which was used once for
a `$NetBSD$` expansion. There might be more of a case to be made for
preserving this one as a diff-reduction measure, but it seems mostly
pointless.

This builds and tests pass except for
libarchive_test_read_disk_directory_traversals which failed on master as
well.
2023-11-20 17:41:49 -08:00
Martin Matuska
c8711937f4 Libarchive 3.7.3dev 2023-09-12 00:50:11 +02:00
Martin Matuska
98f9063f22 CI: update Windows zlib build dependency to 1.3 2023-09-11 22:06:36 +02:00
Martin Matuska
05c86f9c75 CI: update Windows build dependencies
Update zlib to 1.2.13, xz to 1.4.4 and zstd to 1.5.5
2023-08-15 09:56:09 +02:00
Martin Matuska
574f6594ce build: add missing HAVE_STRUCT_STATFS to build/cmake/config.h.in
Fixes #1937
2023-08-04 00:18:10 +02:00
Martin Matuska
27ca5119f7 unzip: use libarchive-style getopt() implementation 2023-07-31 11:59:39 +02:00
Martin Matuska
a8578c0b61 unzip: support --version argument 2023-07-31 02:21:42 +02:00
Martin Matuska
0e1e2b926a Libarchive 3.7.2dev 2023-07-29 19:30:12 +02:00
Martin Matuska
5397c4ed5c unzip: add NetBSD implementation of getline() if not supported
Fixes #1933
2023-07-24 13:43:48 +02:00
Martin Matuska
a122717ffc Libarchive 3.7.1dev 2023-07-18 09:29:44 +02:00
Martin Matuska
ee45796171 Release 3.7.0 2023-07-18 08:30:36 +02:00
Martin Matuska
386412e24e unzip: disable build on Windows
Bsdunzip has not been ported to Windows yet.
Add header checks for fcntl.h and sys/queue.h
Add function check for fcntl()
2023-07-14 20:49:31 +02:00