]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
14 years agominor tweak; trust the unconsumed value returned back rather than just assuming it...
Brian Harring [Thu, 23 Sep 2010 11:27:06 +0000 (07:27 -0400)] 
minor tweak; trust the unconsumed value returned back rather than just assuming it's always 60.  This is primarily a robustness change

SVN-Revision: 2690

14 years agonot hugely happy with the implementation (specifically unconsumed passing), but rewor...
Brian Harring [Thu, 23 Sep 2010 11:26:11 +0000 (07:26 -0400)] 
not hugely happy with the implementation (specifically unconsumed passing), but rework the header reading to properly pair it's read_ahead/consume usage

SVN-Revision: 2689

14 years agofix another mispairing of read_ahead/consume
Brian Harring [Thu, 23 Sep 2010 11:06:59 +0000 (07:06 -0400)] 
fix another mispairing of read_ahead/consume

SVN-Revision: 2688

14 years agocorrect a mismatch- you tell libarchive something is consumed only after you've actua...
Brian Harring [Thu, 23 Sep 2010 10:21:09 +0000 (06:21 -0400)] 
correct a mismatch- you tell libarchive something is consumed only after you've actually consumed it.  Once you've consumed a read_ahead block, the data it points to is volatile.  Mainline trunk currently currently wouldn't cause issues with this usage, but the usage violates the api contract (and will have issues under libtransform) so fixing it.

SVN-Revision: 2687

14 years agofix an overlapping memcpy identified by valgrind; use memove instead
Brian Harring [Wed, 22 Sep 2010 14:32:46 +0000 (10:32 -0400)] 
fix an overlapping memcpy identified by valgrind; use memove instead

SVN-Revision: 2684

14 years agofix out of bounds access; confirm the size, than do the access.
Brian Harring [Wed, 22 Sep 2010 03:41:19 +0000 (23:41 -0400)] 
fix out of bounds access; confirm the size, than do the access.

SVN-Revision: 2677

15 years agofix tcp.sh to work (looks like upon importation it picked up some address scrubbing...
Brian Harring [Wed, 1 Sep 2010 12:25:23 +0000 (08:25 -0400)] 
fix tcp.sh to work (looks like upon importation it picked up some address scrubbing crap from gmail/websites).  tweak the logic slightly also to just process available tar implementaitons for testing

SVN-Revision: 2608

15 years agoRemove the SCHILY dev/ino/nlink attributes, since noone seems to
Tim Kientzle [Sun, 22 Aug 2010 20:33:41 +0000 (16:33 -0400)] 
Remove the SCHILY dev/ino/nlink attributes, since noone seems to
be actually using them and they generate a lot of complaints.

SVN-Revision: 2563

15 years agoWhen -R is specified, make sure to clear the uname/gname
Tim Kientzle [Sun, 15 Aug 2010 04:11:25 +0000 (00:11 -0400)] 
When -R is specified, make sure to clear the uname/gname
fields.  Add a TODO here for the -R parser to return
usable uname/gname text (only useful for tar output,
so not a huge priority right now).

SVN-Revision: 2554

15 years agoUpdate config_freebsd.h
Tim Kientzle [Tue, 10 Aug 2010 05:56:44 +0000 (01:56 -0400)] 
Update config_freebsd.h

SVN-Revision: 2553

15 years agoFix a signed mismatch on 64-bit architectures.
Tim Kientzle [Tue, 10 Aug 2010 05:56:19 +0000 (01:56 -0400)] 
Fix a signed mismatch on 64-bit architectures.

SVN-Revision: 2552

15 years agoCorrect some signed/unsigned mismatches on 64-bit platforms.
Tim Kientzle [Tue, 10 Aug 2010 05:55:34 +0000 (01:55 -0400)] 
Correct some signed/unsigned mismatches on 64-bit platforms.

SVN-Revision: 2551

15 years agoRemove unused STDIN_FILNO, STDOUT_FILENO, STDERR_FILENO definitions.
Tim Kientzle [Tue, 10 Aug 2010 05:31:14 +0000 (01:31 -0400)] 
Remove unused STDIN_FILNO, STDOUT_FILENO, STDERR_FILENO definitions.

SVN-Revision: 2550

15 years agoRemove a couple of unused arguments from internal functions.
Tim Kientzle [Sun, 8 Aug 2010 22:56:40 +0000 (18:56 -0400)] 
Remove a couple of unused arguments from internal functions.

SVN-Revision: 2549

15 years agoPreserve const when casting.
Tim Kientzle [Sun, 8 Aug 2010 22:43:31 +0000 (18:43 -0400)] 
Preserve const when casting.

SVN-Revision: 2548

15 years agombstowcs returns size_t, so store the result in a size_t.
Tim Kientzle [Sun, 8 Aug 2010 22:42:33 +0000 (18:42 -0400)] 
mbstowcs returns size_t, so store the result in a size_t.

SVN-Revision: 2547

15 years agoUse the same type for both branches of the ternary here.
Tim Kientzle [Sun, 8 Aug 2010 22:41:56 +0000 (18:41 -0400)] 
Use the same type for both branches of the ternary here.

SVN-Revision: 2546

15 years agoUnused variable.
Tim Kientzle [Sun, 8 Aug 2010 22:37:27 +0000 (18:37 -0400)] 
Unused variable.

SVN-Revision: 2545

15 years agoDisable sparse file support on Linux.
Tim Kientzle [Sun, 1 Aug 2010 06:16:36 +0000 (02:16 -0400)] 
Disable sparse file support on Linux.
The setup_sparse() function needs to be rewritten to properly
merge extent information into a useful file map.

SVN-Revision: 2544

15 years agoAccept and ignore multiple PVDs.
Tim Kientzle [Sat, 31 Jul 2010 17:14:11 +0000 (13:14 -0400)] 
Accept and ignore multiple PVDs.

Thanks to: Aaron W Hsu for sharing some ISO images with multiple PVDs
  that were previously rejected.

SVN-Revision: 2543

15 years agoAdd the new libarchive/test/test_open_failure.c to the
Tim Kientzle [Sat, 31 Jul 2010 16:40:07 +0000 (12:40 -0400)] 
Add the new libarchive/test/test_open_failure.c to the
autoconf-based build system.

SVN-Revision: 2542

15 years agoNew test: Verify that failures of the client opener
Tim Kientzle [Sun, 25 Jul 2010 01:17:34 +0000 (21:17 -0400)] 
New test:  Verify that failures of the client opener
or initial read produce an immediate close
and don't cause any problems when freeing the archive.

SVN-Revision: 2541

15 years agoInstead of trying a read-ahead after each filter stage,
Tim Kientzle [Sun, 25 Jul 2010 01:16:30 +0000 (21:16 -0400)] 
Instead of trying a read-ahead after each filter stage,
just do it once after the full pipeline is built.
In particular, this catches errors on uncompressed
input at open time.  Also, if any filter stage fails
to initialize, clean up the entire pipeline
immediately.

SVN-Revision: 2540

15 years agoIf opening the filter pipeline fails, immediately
Tim Kientzle [Sun, 25 Jul 2010 01:11:34 +0000 (21:11 -0400)] 
If opening the filter pipeline fails, immediately
close the pipeline and return with an error without
initializing the format writer.  Ensure that close requests
propagate up the pipeline even if a particular
stage hasn't registered a closer.

In particular, this fixes a crash that occurs when
write openers would fail but the format would get
initialized anyway.  At close time, formats such
as tar perform a write that would crash because the
pipeline wasn't fully initialized.  With this
change, the format never gets initialized in
this case so it doesn't need to be cleaned up.

SVN-Revision: 2539

15 years agoTreat ENOSYS as ENOTSUP for optional features to avoid fatal errors.
Andreas Henriksson [Tue, 20 Jul 2010 09:13:39 +0000 (05:13 -0400)] 
Treat ENOSYS as ENOTSUP for optional features to avoid fatal errors.

This fixes libarchive on (Debian GNU/Linux) HPPA,
where ENOSYS is returned for xattrs.

See http://code.google.com/p/libarchive/issues/detail?id=102
and original report at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588925#10

SVN-Revision: 2537

15 years agoAs reported by Aaron W Hsu, some ISO writers put a
Tim Kientzle [Mon, 19 Jul 2010 05:24:09 +0000 (01:24 -0400)] 
As reported by Aaron W Hsu, some ISO writers put a
Path Table starting at sector 18; the taster was rejecting
such archives (requiring that the path table start after
sector 18).

SVN-Revision: 2536

15 years agoVirtualize archive_read_next_header(). In particular, attempts to
Tim Kientzle [Sat, 17 Jul 2010 23:23:16 +0000 (19:23 -0400)] 
Virtualize archive_read_next_header().  In particular, attempts to
call this on a read_disk handle will fail immediately with a Null
pointer dereference instead of trying to run the archive_read
implementation, which fails with a much more inscrutable error.

SVN-Revision: 2535

15 years agoFix typo
Joerg Sonnenberger [Thu, 15 Jul 2010 15:00:37 +0000 (11:00 -0400)] 
Fix typo

SVN-Revision: 2534

15 years agoAs discussed on the libarchive-discuss mailing list,
Tim Kientzle [Tue, 13 Jul 2010 03:36:29 +0000 (23:36 -0400)] 
As discussed on the libarchive-discuss mailing list,
don't use any special declaration marker for GNU C on Windows.
The explicit dllimport marker hasn't been needed for many years
and removing it allows the same headers to be used for either a
static or dynamic library.

SVN-Revision: 2533

15 years agoOn Windows, use UNICODE version APIs to exceed the limitation of path length.
Michihiro NAKAJIMA [Fri, 9 Jul 2010 16:08:13 +0000 (12:08 -0400)] 
On Windows, use UNICODE version APIs to exceed the limitation of path length.

SVN-Revision: 2532

15 years agoOn Windows, use BY_HANDLE_FILE_INFORMAION directly to set up a archive_entry
Michihiro NAKAJIMA [Thu, 8 Jul 2010 15:59:50 +0000 (11:59 -0400)] 
On Windows, use BY_HANDLE_FILE_INFORMAION directly to set up a archive_entry
object instead of struct stat with archive_entry_copy_stat in
directory traversals.

SVN-Revision: 2529

15 years agoTrim \r from each line of archive_read_disk.c
Michihiro NAKAJIMA [Thu, 8 Jul 2010 14:00:49 +0000 (10:00 -0400)] 
Trim \r from each line of archive_read_disk.c

SVN-Revision: 2528

15 years agoDon't abuse typecasts, fix a build failure on FreeBSD 7.3.
Tim Kientzle [Thu, 8 Jul 2010 04:09:05 +0000 (00:09 -0400)] 
Don't abuse typecasts, fix a build failure on FreeBSD 7.3.

SVN-Revision: 2527

15 years agoRework minitar example to use archive_read_disk directory
Tim Kientzle [Sun, 4 Jul 2010 02:38:06 +0000 (22:38 -0400)] 
Rework minitar example to use archive_read_disk directory
traversal instead of a local copy of tree.c

SVN-Revision: 2526

15 years agoFor libarchive 3.0, use int64_t instead of uid_t, gid_t, ino_t.
Tim Kientzle [Sat, 3 Jul 2010 22:12:20 +0000 (18:12 -0400)] 
For libarchive 3.0, use int64_t instead of uid_t, gid_t, ino_t.

SVN-Revision: 2525

15 years agoFinish fixing the breakage from r2522: In particular, fcopyfile() seems
Tim Kientzle [Sat, 3 Jul 2010 03:56:02 +0000 (23:56 -0400)] 
Finish fixing the breakage from r2522:  In particular, fcopyfile() seems
broken so we can't use the more straightforward (and more secure)
fd-oriented approach here.

SVN-Revision: 2524

15 years agoFix a counting error in the Mac pathname editing.
Tim Kientzle [Sat, 3 Jul 2010 02:32:12 +0000 (22:32 -0400)] 
Fix a counting error in the Mac pathname editing.
Using memmove() here is efficient, but a bit touchy.
This fixes bsdtar_test_copy, which was broken in r2522.

SVN-Revision: 2523

15 years agoPush support for writing Mac attributes into tar archives
Tim Kientzle [Sat, 3 Jul 2010 01:44:49 +0000 (21:44 -0400)] 
Push support for writing Mac attributes into tar archives
out of tar and into libarchive.

In particular, this makes the Mac support available to
cpio and other clients; it's no longer specific to tar.

Note, though, that this also implies that Mac attribute
support is specific to the format writer.

SVN-Revision: 2522

15 years agoiso9660: disable trailing dot stripping code in joliet for now.
Andreas Henriksson [Fri, 2 Jul 2010 07:33:27 +0000 (03:33 -0400)] 
iso9660: disable trailing dot stripping code in joliet for now.

Haven't been able to figure out what makes this code not work.
Disable it for now with a comment until someone manages to figure it out.

SVN-Revision: 2521

15 years agoiso9660: fix joliet version/dot stripping code to handle wide characters.
Andreas Henriksson [Thu, 1 Jul 2010 15:54:04 +0000 (11:54 -0400)] 
iso9660: fix joliet version/dot stripping code to handle wide characters.

Kientzle noticed that test_write_format_iso9660_filename failure
was introduced by rev 2514. See comments at:
http://code.google.com/p/libarchive/source/detail?r=2514

This fixes the problem by not comparing wchar_t against 'x' but L'x'.

SVN-Revision: 2520

15 years agoReflect various merges for 2.8.4. v2.8.4
Joerg Sonnenberger [Wed, 30 Jun 2010 09:56:17 +0000 (05:56 -0400)] 
Reflect various merges for 2.8.4.

SVN-Revision: 2519

15 years agoBasic test for tar --newer-than option. So far, this
Tim Kientzle [Wed, 30 Jun 2010 05:12:57 +0000 (01:12 -0400)] 
Basic test for tar --newer-than option.  So far, this
exercises very basic creation-time filtering and
extraction-time filtering but doesn't yet test the
directory-descent problem documented in Issue 97.
It did uncover a problem with extraction-time filtering
that is fixed here.

SVN-Revision: 2518

15 years agoFix Issue 100: Allow a zero for the Type M Path Table Location, since
Tim Kientzle [Tue, 29 Jun 2010 19:45:25 +0000 (15:45 -0400)] 
Fix Issue 100:  Allow a zero for the Type M Path Table Location, since
WinISO (and probably other programs) set it this way.

SVN-Revision: 2516

15 years agoReport the filename that appeared as a duplicate.
Tim Kientzle [Tue, 29 Jun 2010 19:31:07 +0000 (15:31 -0400)] 
Report the filename that appeared as a duplicate.

SVN-Revision: 2515

15 years agoiso9660/joliet: enable version stripping code.
Andreas Henriksson [Tue, 29 Jun 2010 15:49:49 +0000 (11:49 -0400)] 
iso9660/joliet: enable version stripping code.

This change enables the previously untested code for stripping
off ;1 from filenames.

Some programs (like Nero) always appends versions to the filenames
in the joliet extension, so lets strip it.

This fixes the previously commited testcase ("isojoliet_versioned").

SVN-Revision: 2514

15 years agotest: add joliet iso with versioned files testcase.
Andreas Henriksson [Tue, 29 Jun 2010 15:47:14 +0000 (11:47 -0400)] 
test: add joliet iso with versioned files testcase.

Add test code and a Nero ISO image for testing joliet
code with isos that always append version numbers.

SVN-Revision: 2513

15 years agoMerge r2511:
Joerg Sonnenberger [Mon, 28 Jun 2010 21:44:02 +0000 (17:44 -0400)] 
Merge r2511:
Add two more cases where wcscmp is needed. From Hauke Fath

SVN-Revision: 2512

15 years agoAdd two more cases where wcscmp is needed. From Hauke Fath
Joerg Sonnenberger [Mon, 28 Jun 2010 21:31:24 +0000 (17:31 -0400)] 
Add two more cases where wcscmp is needed. From Hauke Fath

SVN-Revision: 2511

15 years agoMerge r2498:
Joerg Sonnenberger [Sun, 27 Jun 2010 18:51:04 +0000 (14:51 -0400)] 
Merge r2498:
Improve support for systems without modern wctype.h by providing local
versions of wcscpy in test_entry.c and wcscmp in main.c.

SVN-Revision: 2510

15 years agoMerge branches/wstring: This adds a new archive_wstring
Tim Kientzle [Sun, 27 Jun 2010 01:28:00 +0000 (21:28 -0400)] 
Merge branches/wstring:  This adds a new archive_wstring
type for unicode strings and uses it to simplify some
of the code in archive_entry.

SVN-Revision: 2508

15 years agoChoose the copy buffer size used for reading files
Tim Kientzle [Sat, 26 Jun 2010 18:41:38 +0000 (14:41 -0400)] 
Choose the copy buffer size used for reading files
to be archived dynamically:
  * At least 64k
  * At least as large as the -b setting
In particular, this should speed up things noticably when large -b
values are in use.  This is also the first cut at aligning the copy
buffer so we can take advantage of O_DIRECT someday.

SVN-Revision: 2504

15 years agoUse -b setting when interpolating archives.
Tim Kientzle [Sat, 26 Jun 2010 17:18:30 +0000 (13:18 -0400)] 
Use -b setting when interpolating archives.
Simplify the handling of -b values by setting
a default early and then just using the value
instead of duplicating the logic.

SVN-Revision: 2503

15 years agoUse intmax_t for %jd printf arguments.
Tim Kientzle [Sat, 26 Jun 2010 06:17:32 +0000 (02:17 -0400)] 
Use intmax_t for %jd printf arguments.
We should probably be using archive_string_sprintf
here instead of printf to avoid the portability problem
(not all platforms have intmax_t, not all have %jd).

SVN-Revision: 2502

15 years agoVarious tar format improvements:
Tim Kientzle [Fri, 25 Jun 2010 23:26:45 +0000 (19:26 -0400)] 
Various tar format improvements:
 * Improve description of Apple extensions
 * AIX ACL extensions
 * Solaris ACL extensions
 * Move numeric extensions section next to ustar section
 * Add summary of tar header types
 * Add LIBARCHIVE.* pax extensions

SVN-Revision: 2501

15 years agoClear a new fixup_entry. Otherwise, the fixup pass
Tim Kientzle [Fri, 25 Jun 2010 18:31:53 +0000 (14:31 -0400)] 
Clear a new fixup_entry.  Otherwise, the fixup pass
crashes when it tries to free the garbage pointers.

SVN-Revision: 2500

15 years agocast DWORD to int to match %d printf specifier
Tim Kientzle [Fri, 25 Jun 2010 04:03:48 +0000 (00:03 -0400)] 
cast DWORD to int to match %d printf specifier

SVN-Revision: 2499

15 years agoImprove support for systems without modern wctype.h by providing local
Joerg Sonnenberger [Thu, 24 Jun 2010 20:14:41 +0000 (16:14 -0400)] 
Improve support for systems without modern wctype.h by providing local
versions of wcscpy in test_entry.c and wcscmp in main.c.

SVN-Revision: 2498

15 years agoMerge r2495: Fix distribution list to include all cpio testcases.
Joerg Sonnenberger [Mon, 21 Jun 2010 15:27:51 +0000 (11:27 -0400)] 
Merge r2495: Fix distribution list to include all cpio testcases.
Megre r2496: Don't compile in wide char test cases if wcscpy is missing.

SVN-Revision: 2497

15 years agoDon't compile in wide char test cases if wcscpy is missing.
Joerg Sonnenberger [Mon, 21 Jun 2010 12:42:02 +0000 (08:42 -0400)] 
Don't compile in wide char test cases if wcscpy is missing.

SVN-Revision: 2496

15 years agoFix distribution list to include all cpio testcases.
Joerg Sonnenberger [Mon, 21 Jun 2010 12:31:42 +0000 (08:31 -0400)] 
Fix distribution list to include all cpio testcases.

SVN-Revision: 2495

15 years agoMerge 2493:
Joerg Sonnenberger [Sun, 20 Jun 2010 21:24:22 +0000 (17:24 -0400)] 
Merge 2493:
Be nice to ancient bzlib.h, it needs stdio.h.

SVN-Revision: 2494

15 years agoBe nice to ancient bzlib.h, it needs stdio.h.
Joerg Sonnenberger [Sun, 20 Jun 2010 21:22:40 +0000 (17:22 -0400)] 
Be nice to ancient bzlib.h, it needs stdio.h.

SVN-Revision: 2493

15 years agoMerge r2490 and r2491:
Joerg Sonnenberger [Sat, 19 Jun 2010 17:47:04 +0000 (13:47 -0400)] 
Merge r2490 and r2491:
Fall back to getgrgid and getpwuid if the reentrant versions are missing.

SVN-Revision: 2492

15 years agoMust define constants to 1 for #if to work.
Joerg Sonnenberger [Sat, 19 Jun 2010 17:34:15 +0000 (13:34 -0400)] 
Must define constants to 1 for #if to work.

SVN-Revision: 2491

15 years agoFall back to getgrgid and getpwuid if the reentrant versions are missing.
Joerg Sonnenberger [Sat, 19 Jun 2010 17:25:58 +0000 (13:25 -0400)] 
Fall back to getgrgid and getpwuid if the reentrant versions are missing.

SVN-Revision: 2490

15 years agoMerge 2488: Deal with bzip2 before 1.0 by not using it.
Joerg Sonnenberger [Sat, 19 Jun 2010 13:14:17 +0000 (09:14 -0400)] 
Merge 2488: Deal with bzip2 before 1.0 by not using it.

SVN-Revision: 2489

15 years agoDeal with bzip2 before 1.0 by not using it.
Joerg Sonnenberger [Sat, 19 Jun 2010 13:02:48 +0000 (09:02 -0400)] 
Deal with bzip2 before 1.0 by not using it.

SVN-Revision: 2488

15 years agoAdd ARCHIVE_EXTRACT_MAC_METADATA flag to archive_write_disk. This
Tim Kientzle [Sat, 19 Jun 2010 02:48:53 +0000 (22:48 -0400)] 
Add ARCHIVE_EXTRACT_MAC_METADATA flag to archive_write_disk.  This
feeds the mac_metadata blob from the archive_entry to the Mac
copyfile() function to restore ACLs and xattrs.  Restoring these attrs
on dirs is correctly deferred until end-of-archive.

Enable this for tar -p

This is the rest of the support for reading and restoring
Apple extensions to tar archives.

SVN-Revision: 2486

15 years agoIncrease the amount of context when assertEqualMem fails.
Tim Kientzle [Fri, 18 Jun 2010 00:50:33 +0000 (20:50 -0400)] 
Increase the amount of context when assertEqualMem fails.

SVN-Revision: 2484

15 years agoMerge 2482: stdint.h is needed on QNX for the test cases too.
Joerg Sonnenberger [Thu, 17 Jun 2010 14:41:44 +0000 (10:41 -0400)] 
Merge 2482: stdint.h is needed on QNX for the test cases too.

SVN-Revision: 2483

15 years agoQNX needs stdint.h in the test cases as well.
Joerg Sonnenberger [Thu, 17 Jun 2010 14:40:05 +0000 (10:40 -0400)] 
QNX needs stdint.h in the test cases as well.
From Sean Boudreau.

SVN-Revision: 2482

15 years agoMerge r2480:
Joerg Sonnenberger [Wed, 16 Jun 2010 21:55:50 +0000 (17:55 -0400)] 
Merge r2480:
If no equal sign was found in the buffer, don't use it as base for
computing the line length.

SVN-Revision: 2481

15 years agoIf no equal sign was found in the buffer, don't use it as base for
Joerg Sonnenberger [Wed, 16 Jun 2010 21:49:51 +0000 (17:49 -0400)] 
If no equal sign was found in the buffer, don't use it as base for
computing the line length.

SVN-Revision: 2480

15 years agoMerge r2269 and part of r2359:
Joerg Sonnenberger [Wed, 16 Jun 2010 20:29:53 +0000 (16:29 -0400)] 
Merge r2269 and part of r2359:
Only enable FreeBSD-style xattr support, if EXTATTR_NAMESPACE_USER
exists.

SVN-Revision: 2479

15 years agoMerged r2058, r2366, r2375-r2380, r2385-r2392, r2395, r2402,r
Joerg Sonnenberger [Wed, 16 Jun 2010 20:05:39 +0000 (16:05 -0400)] 
Merged r2058, r2366, r2375-r2380, r2385-r2392, r2395, r2402,r
r2404-r2405, r2410-r2412, r2415, r2420, r2476 from trunk:

- 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

Bump version to 2.8.4

SVN-Revision: 2478

15 years agoRevert r2412 and require autoconf 2.65 instead.
Joerg Sonnenberger [Wed, 16 Jun 2010 18:38:50 +0000 (14:38 -0400)] 
Revert r2412 and require autoconf 2.65 instead.

SVN-Revision: 2477

15 years agoOnly use poll(2) if either poll.h or sys/poll.h exists.
Joerg Sonnenberger [Tue, 15 Jun 2010 23:55:05 +0000 (19:55 -0400)] 
Only use poll(2) if either poll.h or sys/poll.h exists.

SVN-Revision: 2476

15 years agoFix a segmentation fault.
Michihiro NAKAJIMA [Mon, 14 Jun 2010 05:12:01 +0000 (01:12 -0400)] 
Fix a segmentation fault.

SVN-Revision: 2475

15 years agoMake EXT2_IOC_GETFLAGS enabled and fix build error.
Michihiro NAKAJIMA [Mon, 14 Jun 2010 05:06:11 +0000 (01:06 -0400)] 
Make EXT2_IOC_GETFLAGS enabled and fix build error.

SVN-Revision: 2474

15 years agoUse __FreeBSD__ macro instead of HAVE_GETVFSBYNAME and HAVE_STATFS.
Michihiro NAKAJIMA [Mon, 14 Jun 2010 04:34:29 +0000 (00:34 -0400)] 
Use __FreeBSD__ macro instead of HAVE_GETVFSBYNAME and HAVE_STATFS.

SVN-Revision: 2473

15 years agoOn Windows, remove chdir/SetCurrentDirectory from archive_read_disk.c
Michihiro NAKAJIMA [Mon, 14 Jun 2010 04:19:40 +0000 (00:19 -0400)] 
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.

SVN-Revision: 2472

15 years agoFix an overflow in the compression ratio calculation.
Tim Kientzle [Mon, 14 Jun 2010 03:00:23 +0000 (23:00 -0400)] 
Fix an overflow in the compression ratio calculation.

SVN-Revision: 2471

15 years agoUse FindFirstFile for the first entry to detect whether the entry is a symbolic link...
Michihiro NAKAJIMA [Fri, 11 Jun 2010 19:38:46 +0000 (15:38 -0400)] 
Use FindFirstFile for the first entry to detect whether the entry is a symbolic link because GetFileInformationByHandle does not provide Reparse Point Tag.

SVN-Revision: 2470

15 years agoAdd support for archive_read_disk_current_filesystem_is_remote on Windows.
Michihiro NAKAJIMA [Fri, 11 Jun 2010 18:35:39 +0000 (14:35 -0400)] 
Add support for archive_read_disk_current_filesystem_is_remote on Windows.

SVN-Revision: 2469

15 years agoIt seems OpenBSD does not set MNT_LOCAL/ST_LOCAL to statvfs.f_flag.
Michihiro NAKAJIMA [Fri, 11 Jun 2010 09:08:52 +0000 (05:08 -0400)] 
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.

SVN-Revision: 2468

15 years agoRename filesystem_information to setup_current_filesystem and
Michihiro NAKAJIMA [Fri, 11 Jun 2010 08:55:49 +0000 (04:55 -0400)] 
Rename filesystem_information to setup_current_filesystem and
make its arguments simple.

SVN-Revision: 2467

15 years agoAdd support for archive_read_disk_current_filesystem_is_synthetic and
Michihiro NAKAJIMA [Fri, 11 Jun 2010 07:39:27 +0000 (03:39 -0400)] 
Add support for archive_read_disk_current_filesystem_is_synthetic and
archive_read_disk_current_filesystem_is_remote on Linux.

SVN-Revision: 2466

15 years agoTweak a test for directory traversals.
Michihiro NAKAJIMA [Fri, 11 Jun 2010 07:18:06 +0000 (03:18 -0400)] 
Tweak a test for directory traversals.
The order of file entry on different platform varies.

SVN-Revision: 2465

15 years agoAdd support for archive_read_disk_current_filesystem_is_remote on NetBSD and OpenBSD.
Michihiro NAKAJIMA [Fri, 11 Jun 2010 07:07:53 +0000 (03:07 -0400)] 
Add support for archive_read_disk_current_filesystem_is_remote on NetBSD and OpenBSD.

SVN-Revision: 2464

15 years agoAdd archive_read_disk_current_filesystem_is_synthetic and
Michihiro NAKAJIMA [Fri, 11 Jun 2010 01:06:15 +0000 (21:06 -0400)] 
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.

SVN-Revision: 2463

15 years agoAdd archive_read_disk_current_filesystem which returns an ID, which
Michihiro NAKAJIMA [Thu, 10 Jun 2010 22:57:12 +0000 (18:57 -0400)] 
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.

SVN-Revision: 2462

15 years agoSupport archive_read_data_block in archive_read_disk.
Michihiro NAKAJIMA [Thu, 10 Jun 2010 20:39:39 +0000 (16:39 -0400)] 
Support archive_read_data_block in archive_read_disk.

SVN-Revision: 2461

15 years agoAdditional test calling archive_read_disk with a regular file.
Michihiro NAKAJIMA [Thu, 10 Jun 2010 18:31:48 +0000 (14:31 -0400)] 
Additional test calling archive_read_disk with a regular file.

SVN-Revision: 2460

15 years agoBackout __la_lstat.
Michihiro NAKAJIMA [Thu, 10 Jun 2010 00:18:31 +0000 (20:18 -0400)] 
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.

SVN-Revision: 2459

15 years agoAdd __la_lstat similar to lstat.
Michihiro NAKAJIMA [Wed, 9 Jun 2010 22:52:09 +0000 (18:52 -0400)] 
Add __la_lstat similar to lstat.

SVN-Revision: 2458

15 years agoAdd test code for using wildcard on Windows.
Michihiro NAKAJIMA [Wed, 9 Jun 2010 22:08:49 +0000 (18:08 -0400)] 
Add test code for using wildcard on Windows.

SVN-Revision: 2457

15 years agoUse struct archive_string for handling a path name at archvie_read_disk.c
Michihiro NAKAJIMA [Wed, 9 Jun 2010 22:01:38 +0000 (18:01 -0400)] 
Use struct archive_string for handling a path name at archvie_read_disk.c

SVN-Revision: 2456

15 years agoBring the code supporting directory traversals from bsdtar/tree.[ch]
Michihiro NAKAJIMA [Wed, 9 Jun 2010 21:54:13 +0000 (17:54 -0400)] 
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.

SVN-Revision: 2455

15 years agoFix my previous committed code; eliminate build error with ARCHIVE_VERSION_NUMBER...
Michihiro NAKAJIMA [Tue, 8 Jun 2010 21:33:24 +0000 (17:33 -0400)] 
Fix my previous committed code; eliminate build error with ARCHIVE_VERSION_NUMBER >= 3000000

SVN-Revision: 2454

15 years agoMake archive_read_next_header2 and archive_read_data_block virtualization.
Michihiro NAKAJIMA [Tue, 8 Jun 2010 21:18:32 +0000 (17:18 -0400)] 
Make archive_read_next_header2 and archive_read_data_block virtualization.
This is a initial step of supporting directory traversals in archive_read_disk.

SVN-Revision: 2453