- Refactor hash function scan to use a compile+link test to increase
robustness
- Deal with missing getgrnam_r / getpwnam_r functions
- Properly define HAVE_SIGACTION for cmake
- Only use poll in filter_fork.c, if either poll.h or sys/poll.h exists
- \\ -> \e in man pages, drop empty BUGS section
- Deal with interrupted reads and continue
On Windows, remove chdir/SetCurrentDirectory from archive_read_disk.c
You cannot exceed the 260 bytes limit of path length, even if
you change the current working directory as POSIX system.
For example,
SetCurrentDirectory(<240-bytes-full-path>);
CreateFile(<21-bytes-path>);
^^^ it fails because the `full' path length of that file is 262 bytes.
This is Windows behavior. we should use wchar_t with '\\?\' prefix
to exceed the path limit.
Use FindFirstFile for the first entry to detect whether the entry is a symbolic link because GetFileInformationByHandle does not provide Reparse Point Tag.
It seems OpenBSD does not set MNT_LOCAL/ST_LOCAL to statvfs.f_flag.
ST_LOCAL and MNT_LOCAL are the same value on NetBSD, but OpenBSD
does not define ST_LOCAL so we should use it instead of MNT_LOCAL
to prevent OpenBSD.
Add archive_read_disk_current_filesystem_is_synthetic and
archive_read_disk_current_filesystem_is_remote, which provide
filesystem information. Currently those are supported on FreeBSD only.
I will guradually support other platform.
Add archive_read_disk_current_filesystem which returns an ID, which
is index of filesystem entry you've visited through directory traversals
in archive_read_disk.
Backout __la_lstat.
It seems using FILE_FLAG_OPEN_REPARSE_POINT flag to CreateFile has effect to other things, not only symbolic link.
We have to check Reparse Point Tags before using FILE_FLAG_OPEN_REPARSE_POINT.
Bring the code supporting directory traversals from bsdtar/tree.[ch]
into archive_read_disk.c and modify it.
Introduce new APIs archive_read_disk_open and archive_read_disk_descend.
TODO: - implement archive_read_data_block and others.
- adapt it to libarchive world, for example, use struct archive_string.
Make archive_read_next_header2 and archive_read_data_block virtualization.
This is a initial step of supporting directory traversals in archive_read_disk.
Tim Kientzle [Sat, 5 Jun 2010 02:28:31 +0000 (22:28 -0400)]
Support for reading Mac OS-style metadata blobs.
This adds support for such blobs to archive_entry and
extends the tar reader to identify the special entries
and store them in the archive_entry.
Remaining: extend archive_write_disk to actually
restore the metadata to the file on disk.
On msys, include unistd.h before we redefine ftruncate() to
prevent build error from a type mismatch of ftruncate().
Msys has a unistd.h file and it defines ftruncate() with off_t, and
then it will causes build error after we redefine ftruncate() as
__la_ftruncate(int, int64_t).
Tim Kientzle [Mon, 31 May 2010 18:20:46 +0000 (14:20 -0400)]
Handle EINTR in write calls:
* In low-level writers, just retry after EINTR
* In archive_write, handle short writes by generating additional writes for the remainder of the block.
In particular, this fixes a problem with bsdtar failing if you try to use the SIGINT handler.
TRY_COMPILE requires specific include paths and library paths.
if there are no specific library, TRY_COMPILE wont link any additional
libraries, it means ARCHIVE_HASH_*_OPENSSL are never detected.
Tim Kientzle [Sun, 16 May 2010 20:33:30 +0000 (16:33 -0400)]
Properly support filter(-1) as a shorthand for "the last filter",
which is always the client proxy. In particular, tar uses this for
reporting position in the input stream.
Divide the code detecting ARCHIVE_HASH_*_WIN from CHECK_MD() to
clarify what CHECK_MD does. Basically, CHECK_MD prove that we
can map the HASH functions, which have several types of name, to
archive_{hash name}_init, archive_{hash name}_final and
archive_{hash name}_update through archive_hash.h.
But using ARCHIVE_HASH_*_WIN requires if ACLG_{hash name} is
available, and then __la_hash_*() used under the ARCHIVE_HASH_*_WIN
are defined at archive_windows.c. it's completely different the way
the CHECK_MD does.
Simplify an MD_CHECK macro in CMakeLists.txt.
Using MD_CHECK_{hash name} confuses a person who uses CMake -U option,
which removes a specified variable from CMakeCache.
Brian Harring [Tue, 11 May 2010 09:20:42 +0000 (05:20 -0400)]
fix fwrites... remember, semi modern glibc's, the return on it is marked for checking, thus when doing maintenance/dev builds (which converts warnings to errors) unchecked fwrites are compile failures
For liblzma initialization for lzip, use lzma_raw_decoder() instead
of lzma_alone_decoder(), because lzma_code() refuse some dictionary
size, which lzip uses.
Tim Kientzle [Mon, 3 May 2010 02:55:27 +0000 (22:55 -0400)]
Cmake updates:
* Remove optarg, optind checks which are no longer used
* Remove CreateHardLink{A,W} checks, since these are probed at runtime
* Add defines for getgrnam_r getpwnam_r