357 Commits

Author SHA1 Message Date
Martin Matuska
8a7a9cc527 Release 3.7.9 2025-03-30 21:59:43 +02:00
Peter Kokot
af51e308b2 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.

(cherry picked from commit 2c2266432f1b0bf7be918f354140a6ba4a87a04c)
2025-03-30 21:15:59 +02:00
Martin Matuska
e31747775b Release 3.7.8 2025-03-20 10:45:48 +01:00
Mostyn Bramley-Moore
43550e7aea 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.

(cherry picked from commit 819a50a0436531276e388fc97eb0b1b61d2134a3)
2025-03-11 10:26:40 +01:00
Mostyn Bramley-Moore
e8920dd262 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.

(cherry picked from commit ba76798136062868d2cbe80648ebc6fe2ebfbaed)
2025-03-11 10:25:49 +01:00
Mostyn Bramley-Moore
b6ae700fc3 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.

(cherry picked from commit 29802f6a5e8543e61bac7d9dede42abf21ded5aa)
2025-03-11 10:25:43 +01:00
Mostyn Bramley-Moore
5f7d3c7259 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.

(cherry picked from commit 0bbbe2883ef45b2027ea7395a691a855b1296cd1)
2025-03-11 10:25:38 +01:00
Mostyn Bramley-Moore
baed86a9d4 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.

(cherry picked from commit 9b7540aaf1eddf558aa3f221b0c6c4ad5520dc9b)
2025-03-11 10:25:32 +01:00
Julian Uy
b12fd5f2b3 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

(cherry picked from commit 819c5b01a90e738ced6af237a6ae0d1aff981127)
2025-03-11 10:25:07 +01:00
Mostyn Bramley-Moore
7644a5023f 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.

(cherry picked from commit 84ad8745308463d0e2e7e067b1eda99db5a661b1)
2025-03-11 10:24:38 +01:00
Martin Matuska
b439d586f5 Release 3.7.7 2024-10-13 10:09:33 +02:00
Mostyn Bramley-Moore
b2329b88af 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
```

(cherry picked from commit 6567375f27cc18797062c836f4b0953dfc4b25f3)
2024-10-08 10:42:02 +02:00
Martin Matuska
f0a0bc6b30 Release 3.7.6 2024-09-23 09:04:27 +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
Martin Matuska
96b689a304 CI: fix debug build with cmake 2023-07-14 11:04:51 +02:00
Martin Matuska
d3d16ec25d build: fix cmake build with OpenSSL 2023-07-14 11:01:58 +02:00
Martin Matuska
d5ca0d1153 build: fix cmake build with Mbed TLS 2023-07-14 09:51:28 +02:00
Adrian Vovk
c157e4ce8e Port over FreeBSD's unzip utility
This allows libarchive to act as a drop-in replacement to Info-ZIP
2023-07-14 00:55:38 +02:00
Steve Lhomme
480ba376a6 Fix bcrypt detection on UNIX cross-compilation
The Windows SDK uses an uppercase on the B, but mingw-w64 doesn't.
The autoconf detection already uses a lowercase bcrypt.
2023-07-14 00:28:32 +02:00
Xin "Russell" Liu
aa09163691
fix typo in config.h.in (#1851) 2023-03-01 21:29:50 -08:00
Rosen Penev
0348e24bab
replace time64 functions with normal ones (#1830)
Otherwise there are 32/64-bit pointer conversions going on. In Windows
since MSVC2005, time_t has been 64-bit. MinGW needs a hack to get 64-bit
time_t.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-01-09 15:15:55 +01:00
Martin Matuska
3da2fb7ee2 Libarchive 3.6.3dev 2022-12-09 16:13:56 +01:00
Martin Matuška
6bea1a69c9
Merge pull request #1793 from flyingdutchman23/fix-cmake-warning
Fix CMake warning
2022-12-06 09:58:24 +01:00
Rosen Penev
acef6419fe cmake config ${} to @@
meson's cmake config file handling does not support mixing ${} and @@ in
the same file. Switch to @@ for consistency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-01 16:00:27 -07:00
Joris Clement
92f183af49
Fix CMake warning
The warnings occurs at least with CMake version 3.24. It is caused by
CMake trying to find the gcc library due to case sensitivity.

The warning message was:
```
CMake Warning (dev) at /usr/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
  The package name passed to `find_package_handle_standard_args` (LIBGCC)
  does not match the name of the calling package (LibGCC).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  build/cmake/FindLibGCC.cmake:17 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:1269 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.
```
2022-10-28 17:22:47 +02:00
Reshetnikov Alexandr
f59c9b909b Merge remote-tracking branch 'remotes/origin/master' into zstd_windows 2022-04-28 23:35:05 +04:00
Biswapriyo Nath
a83f3d327a autotools: Fix static linking when openssl is enabled in windows
This adds Requires.private field in pkgconfig file. Using that field,
pkgconfig pulls all the private cflags or libs while static linking.
OpenSSL static libraries require some windows system libraies. Otherwise
static liking fails with libarchive.
2022-04-13 09:48:44 +05:30
Reshetnikov Alexandr
966d164f40 Merge remote-tracking branch 'remotes/origin/master' into zstd_windows
# Conflicts:
#	build/ci/github_actions/ci.cmd
2022-04-12 13:50:53 +04:00