21 Commits
Author SHA1 Message Date
Tobias Stoeckmann ef1744a352 cpio: Use getline in cpio_rename
The buffer has a fixed 1024 limit, which can be smaller than the maximum
allowed path length. Increasing the limit to 4096 would partially help,
but since leading spaces are stripped, input lines could be valid and
longer.

Use getline instead.
2026-03-16 09:43:54 +01:00
Tim Kientzle 96f76577d3 Rename err.h to avoid conflict with system header
Depending on header search path ordering, we can easily
confuse libarchive_fe/err.h with the system header.
Rename ours to lafe_err.h to avoid the confusion.
Rename libarchive_fe/err.c to match.
2025-09-13 12:30:03 -07:00
Zeun 4ebca5ff83 Fix -Werror=warning error and wrap some INSTALL directives with an ENABLE_INSTALL guard (#2397)
1. Fixes build when compiling without ZLIB/BZIP/LZMA `char finishing`
2. All INSTALL directives are now guarded by ENABLE_INSTALL
2024-12-27 12:53:13 -08:00
Emil Velikov 6287b99eb7 Convert the tools and respective tests to SPDX (#2317)
This is the first part of converting the project to use SPDX license
identifiers instead using the verbose license text.

The patches are semi-automated and I've went through manually to ensure
no license changes were made. That said, I would welcome another pair of
eyes, since I am only human.

See https://github.com/libarchive/libarchive/issues/2298

---------

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2024-10-12 20:54:16 -07:00
Michihiro NAKAJIMA c62d30e5fa Avoid CMake Warning that used GET_TARGET_PROPERTY with LOCATION property,
so we should use $<TARGET_FILE> expression instead.
2014-10-13 22:02:39 +09:00
Michihiro NAKAJIMA 9769e6f7d5 Implement reading a passphrase from ttys. 2014-09-21 17:45:59 +09:00
Matt Arsenault e800985adb Fix cmake test builds when building as a sub-project 2013-03-12 21:27:39 -07:00
Michihiro NAKAJIMA ae314ad818 Introduce archive_match_exclude_pattern_from_file(_w) and
archive_match_include_pattern_from_file(_w) reading exclusion/inclusion
patterns from a file. And so retire lafe_exclude_from_file() and
lafe_include_from_file because we can use new APIs instead.
2012-02-12 22:41:47 +09:00
Michihiro NAKAJIMA 718b5cc73c Use archive_matching API at both bsdcpio and bsdtar instead of lafe_exclude functions.
- Remove libarchive_fe/matching.[ch], which are no longer needed.
  - Move cpio/test/test_pathmatch.c into libarchive/test/test_archive_pathmatch.c.

SVN-Revision: 4168
2012-01-18 00:30:38 -05:00
Michihiro NAKAJIMA 576f56e194 I stupidly misunderstood a handling of CMake build options, ENABLE_TAR, ENABLE_TAR_SHARED,
ENABLE_CPIO and ENABLE_CPIO_SHARED, in r3240 and r3713. And that had made bsdtar and bsdcpio
disabled or being test failure on Windows platform.
 - Simplify CMake build options; all platforms have the same default build options.
 - Back out r3713.

SVN-Revision: 3791
2011-11-15 03:27:08 -05:00
Michihiro NAKAJIMA c3a6c2f3d1 Build tar and cpio when both ENABLE_TAR and ENABLE_CPIO are OFF on CMake build system.
SVN-Revision: 3713
2011-09-15 04:34:02 -04:00
Tim Kientzle 5cd96832b5 Issue 48: Instead of setting RUNTIME_OUTPUT_DIRECTORY separately for
each component, set CMAKE_RUNTIME_OUTPUT_DIRECTORY once at the
top and let each component inherit that implicitly.  This allows
other projects that want to include libarchive to do so a little
more simply.

SVN-Revision: 1800
2010-01-03 16:25:38 -05:00
Tim Kientzle 99510e1328 On Windows, building a client against a static libarchive
requires LIBARCHIVE_STATIC be defined.

SVN-Revision: 1653
2009-11-16 01:26:09 -05:00
Tim Kientzle 201eae781e Update comments.
SVN-Revision: 1359
2009-08-11 21:42:04 -04:00
Tim Kientzle 9872d95182 Use LOCATION property to locate executable for testing purposes. It seems to actually work.
SVN-Revision: 1353
2009-08-09 23:34:27 -04:00
Tim Kientzle 91dea94416 A lot of common client source files were recently moved to
the 'libarchive_fe' directory.

SVN-Revision: 1139
2009-05-29 01:16:35 -04:00
Michihiro NAKAJIMA 926d6bcbad Revert r838,r839 and r840.
SVN-Revision: 842
2009-03-25 05:14:53 -04:00
Michihiro NAKAJIMA 4139b09bf3 Make archive_windows.c internal static library.
Now bsdtar and bsdcpio on Windows can be made by
both static build and dynamic build.

SVN-Revision: 840
2009-03-24 09:49:10 -04:00
Michihiro NAKAJIMA 7dd9d16b20 Remove a lot of duplicate functions which simulates POSIX
function for Windows platform. And move the remaining
simulate functions to archive_windows.[ch].  It will be
easy maintenance and avoid the same named functions having
different codes. This change does *not* mean libarchive
library has those ones or exports it. All libarchive's
executable programs include archive_windows.c for one of
its program files.

SVN-Revision: 838
2009-03-24 05:04:15 -04:00
Michihiro NAKAJIMA 7a118a7313 Add support both static and dynamic build of bsdtar and bsdcpio
to the cmake build process except Windows.

SVN-Revision: 826
2009-03-20 22:33:49 -04:00
Michihiro NAKAJIMA 968a8126fa Split a CMakeLists.txt into each subdirectory, and remove
useless '#include LIST_H'. It was used for out-of-source build
with the previous CMakeLists.txt.

SVN-Revision: 823
2009-03-20 08:57:14 -04:00