]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
16 years agoMake sure that it does not lost number by overflow.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 15:22:32 +0000 (11:22 -0400)] 
Make sure that it does not lost number by overflow.

SVN-Revision: 1523

16 years agoRename some variable name from location to offset, which is apt for processing.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 15:08:35 +0000 (11:08 -0400)] 
Rename some variable name from location to offset, which is apt for processing.

SVN-Revision: 1522

16 years agoMinor change to reduce difference from proper supporting rr_move directory,
Michihiro NAKAJIMA [Wed, 14 Oct 2009 11:27:45 +0000 (07:27 -0400)] 
Minor change to reduce difference from proper supporting rr_move directory,
which I'm going to commit.
This change does not affect any results.

SVN-Revision: 1521

16 years agoEliminate compiling warning on Visual Studio.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 10:37:54 +0000 (06:37 -0400)] 
Eliminate compiling warning on Visual Studio.

SVN-Revision: 1520

16 years agoAdd check that int32_t is available, and define it if not.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 10:34:54 +0000 (06:34 -0400)] 
Add check that int32_t is available, and define it if not.

SVN-Revision: 1519

16 years agoAvoid core dump.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 10:10:00 +0000 (06:10 -0400)] 
Avoid core dump.

SVN-Revision: 1518

16 years agoSplit a part of reading subdirectories from
Michihiro NAKAJIMA [Tue, 13 Oct 2009 19:47:40 +0000 (15:47 -0400)] 
Split a part of reading subdirectories from
archive_read_format_iso9660_read_header function.
This is preparation of support RRIP "CL" and "RE" extensions
for proper handling of "rr_moved" directory.

SVN-Revision: 1517

16 years agoRename struct vd parameter names from `sector_number' to `location' and
Michihiro NAKAJIMA [Tue, 13 Oct 2009 19:18:31 +0000 (15:18 -0400)] 
Rename struct vd parameter names from `sector_number' to `location' and
 from `block_size' to `size'.

SVN-Revision: 1516

16 years agoStyle fix.
Michihiro NAKAJIMA [Tue, 13 Oct 2009 19:04:56 +0000 (15:04 -0400)] 
Style fix.

SVN-Revision: 1515

16 years agoAdd sanity check.
Michihiro NAKAJIMA [Tue, 13 Oct 2009 18:56:31 +0000 (14:56 -0400)] 
Add sanity check.

SVN-Revision: 1514

16 years agoFix a bug; reading extensions recorded by SUSP CE extension
Michihiro NAKAJIMA [Tue, 13 Oct 2009 17:50:32 +0000 (13:50 -0400)] 
Fix a bug; reading extensions recorded by SUSP CE extension
did not work and sometimes stole file contents.
Add test for this case.

libarchive 2.7.* have had these following bugs.
1. When length of symlink name is longer than about 70,
   it cannot get modify/access times recorded by "TF" extension
   and maybe next file is stolen a part of its contents by
   that process.
2. When length of file name is longer than about 80,
   it cannot get modify/access times recorded by "TF" extension
   and maybe it's stolen a part of its contents by that process.
3. When length of file name is longer than about 100,
   it cannot get file mode, user id and group id recorded by "PX"
   extension and as above.
4. When length of file name is longer than about 142,
   it gets wrong file name(shorter name) and as above.

Condition of stealing file contents:
  if file->offset - iso9660->current_position < file->ce_size
  in next_entry_seek function, that process consumed file contents
  of which were data of extensions.

That process read wrong data whether that process consumed file
contents or not.

SVN-Revision: 1513

16 years agoCalculate nlinks and use it instead of nlinks reocrded by Rock Ridge extensions.
Michihiro NAKAJIMA [Mon, 12 Oct 2009 20:02:50 +0000 (16:02 -0400)] 
Calculate nlinks and use it instead of nlinks reocrded by Rock Ridge extensions.

SVN-Revision: 1512

16 years agoFix Rockridge option name in test.
Michihiro NAKAJIMA [Mon, 12 Oct 2009 10:25:13 +0000 (06:25 -0400)] 
Fix Rockridge option name in test.

SVN-Revision: 1511

16 years agoIf FILE SERIAL NUMBER of RRIP "PX" extension is recorded in ISO images,
Michihiro NAKAJIMA [Mon, 12 Oct 2009 10:23:34 +0000 (06:23 -0400)] 
If FILE SERIAL NUMBER of RRIP "PX" extension is recorded in ISO images,
use it instead of file offset to find out hardlink target.

SVN-Revision: 1510

16 years agoRename Rock Ridge option name from `rock-ridge' to `rockridge' and `Rockridge'.
Michihiro NAKAJIMA [Mon, 12 Oct 2009 05:29:38 +0000 (01:29 -0400)] 
Rename Rock Ridge option name from `rock-ridge' to `rockridge' and `Rockridge'.

SVN-Revision: 1509

16 years agoOn Linux, the example code requires _FILE_OFFSET_BITS.
Tim Kientzle [Mon, 12 Oct 2009 00:26:08 +0000 (20:26 -0400)] 
On Linux, the example code requires _FILE_OFFSET_BITS.

SVN-Revision: 1507

16 years agoEliminate compiling warning on Visual Studio.
Michihiro NAKAJIMA [Sun, 11 Oct 2009 20:37:14 +0000 (16:37 -0400)] 
Eliminate compiling warning on Visual Studio.

SVN-Revision: 1505

16 years agoCheck Boot Reocrd and Volume Partition format so that ISO reader does not
Michihiro NAKAJIMA [Sun, 11 Oct 2009 20:17:57 +0000 (16:17 -0400)] 
Check Boot Reocrd and Volume Partition format so that ISO reader does not
ignore iso-image files which are recorded Boot Record or Volume Partition.

SVN-Revision: 1504

16 years agoRRIP "RR" extension is obsolete; it appeared only early version of
Michihiro NAKAJIMA [Sun, 11 Oct 2009 11:51:06 +0000 (07:51 -0400)] 
RRIP "RR" extension is obsolete; it appeared only early version of
RRIP standard. Do not use it for seenRockridge flag. Use other
RRIP extensions instead.

SVN-Revision: 1503

16 years agoThe 5th parameter of RRIP "PX" extension is not inode.
Michihiro NAKAJIMA [Sun, 11 Oct 2009 11:17:05 +0000 (07:17 -0400)] 
The 5th parameter of RRIP "PX" extension is not inode.
RRIP Standrd says that parameter, FILE SERIAL NUMBER, shall have the same
meaning as and may be used for the st_ino field of POSIX:5.6.1.
It can treat as inode but not value of inode of directories or files.

SVN-Revision: 1502

16 years agoEliminate double negative condition.
Michihiro NAKAJIMA [Sun, 11 Oct 2009 10:38:08 +0000 (06:38 -0400)] 
Eliminate double negative condition.

SVN-Revision: 1501

16 years agoI was wrong; I included a bug at r1488.
Michihiro NAKAJIMA [Sun, 11 Oct 2009 10:16:33 +0000 (06:16 -0400)] 
I was wrong; I included a bug at r1488.
The bug is option !joliet is ignored.

SVN-Revision: 1500

16 years agoAccording to SUSP Stnadrd, SUSP "SP" extension must be recorded
Michihiro NAKAJIMA [Sun, 11 Oct 2009 09:55:05 +0000 (05:55 -0400)] 
According to SUSP Stnadrd, SUSP "SP" extension must be recorded
in the root directory entry, so it has to be checked only once
and then disable all SUSP processing if not found.

SVN-Revision: 1499

16 years agoFix typo.
Michihiro NAKAJIMA [Fri, 9 Oct 2009 12:14:08 +0000 (08:14 -0400)] 
Fix typo.

SVN-Revision: 1494

16 years agoMove setting of archive_format[_name] of Rock Ridge extensions to proper place.
Michihiro NAKAJIMA [Fri, 9 Oct 2009 12:10:26 +0000 (08:10 -0400)] 
Move setting of archive_format[_name] of Rock Ridge extensions to proper place.

SVN-Revision: 1493

16 years agoAdd sanity checks for directory record and volume size.
Michihiro NAKAJIMA [Fri, 9 Oct 2009 11:33:03 +0000 (07:33 -0400)] 
Add sanity checks for directory record and volume size.
Check return value of parse_file_info function properly.

SVN-Revision: 1492

16 years agoSplit a test mixed Joliet and Rock Ridge from test_read_format_isojoliet_bz2.c
Michihiro NAKAJIMA [Thu, 8 Oct 2009 23:27:58 +0000 (19:27 -0400)] 
Split a test mixed Joliet and Rock Ridge from test_read_format_isojoliet_bz2.c
and fix script that describes how to make test data for that test.
Remove test_read_format_isojolietrr_bz2.iso.bz2.uu which was wrong data;
access time of hardlinke file wasn't changed by touch command.
Add new test data test_read_format_isojoliet_rr.iso.bz2.uu instead.

SVN-Revision: 1491

16 years agoRight now ISO reader read Rock Ridge extentions of the root directory properly,
Michihiro NAKAJIMA [Thu, 8 Oct 2009 22:14:30 +0000 (18:14 -0400)] 
Right now ISO reader read Rock Ridge extentions of the root directory properly,
so some comparing datas must be changed.

SVN-Revision: 1490

16 years agoDisable reading Rock Ridge extentions to read Joliet extentions.
Michihiro NAKAJIMA [Thu, 8 Oct 2009 22:08:17 +0000 (18:08 -0400)] 
Disable reading Rock Ridge extentions to read Joliet extentions.

SVN-Revision: 1489

16 years agoImprove mixed Joliet and Rock Ridge extentions.
Michihiro NAKAJIMA [Thu, 8 Oct 2009 22:05:12 +0000 (18:05 -0400)] 
Improve mixed Joliet and Rock Ridge extentions.
We can get uid,gid and other attributes which is recorded by Rock Ridge
extentions whether Joliet extentions recorded or not.
Fix reading the root directory; it did not read Rock Ridge extentions
of the one.

SVN-Revision: 1488

16 years agoI forgot adding test data for long joliet names test(r1486).
Michihiro NAKAJIMA [Thu, 8 Oct 2009 10:03:53 +0000 (06:03 -0400)] 
I forgot adding test data for long joliet names test(r1486).

SVN-Revision: 1487

16 years agoAdd test for long joliet names.
Michihiro NAKAJIMA [Thu, 8 Oct 2009 09:58:53 +0000 (05:58 -0400)] 
Add test for long joliet names.

SVN-Revision: 1486

16 years agoMinor fixes; tar should always write paths with forward slashes.
Tim Kientzle [Wed, 7 Oct 2009 03:13:27 +0000 (23:13 -0400)] 
Minor fixes; tar should always write paths with forward slashes.

SVN-Revision: 1485

16 years agoAllow longer Joliet names which is up to 103 UCS2 characters(206 bytes)
Michihiro NAKAJIMA [Tue, 6 Oct 2009 18:58:57 +0000 (14:58 -0400)] 
Allow longer Joliet names which is up to 103 UCS2 characters(206 bytes)
from 64 UCS2 characters(103 bytes). mkisofs can record that longer
Joliet names by their option -joliet-long.

SVN-Revision: 1484

16 years agoRemove some code that's no longer used.
Tim Kientzle [Mon, 5 Oct 2009 05:02:06 +0000 (01:02 -0400)] 
Remove some code that's no longer used.

SVN-Revision: 1483

16 years agoRemove some code that's no longer used.
Tim Kientzle [Mon, 5 Oct 2009 04:57:42 +0000 (00:57 -0400)] 
Remove some code that's no longer used.

SVN-Revision: 1482

16 years agoAdd some TODO comments.
Tim Kientzle [Mon, 5 Oct 2009 04:57:23 +0000 (00:57 -0400)] 
Add some TODO comments.

SVN-Revision: 1481

16 years agoOnly accept \ as path separator when reading archives on Windows. This seems to...
Tim Kientzle [Sat, 3 Oct 2009 21:44:41 +0000 (17:44 -0400)] 
Only accept \ as path separator when reading archives on Windows.  This seems to offer the best trade-off of compatibility and correctness.

SVN-Revision: 1480

16 years agoFix remaing bsdtar tests on Cygwin by treating Cygwin like Posix.
Tim Kientzle [Thu, 1 Oct 2009 03:49:04 +0000 (23:49 -0400)] 
Fix remaing bsdtar tests on Cygwin by treating Cygwin like Posix.
This does not (yet) implement the policies regarding path separators
that were recently hashed out on the libarchive-discuss mailing list.

SVN-Revision: 1479

16 years agoOld mkisofs made wrong "SL" System User Entries of RRIP for
Michihiro NAKAJIMA [Tue, 29 Sep 2009 08:01:36 +0000 (04:01 -0400)] 
Old mkisofs made wrong "SL" System User Entries of RRIP for
symbolic files.
New test iso image is made by latest mkisofs that bug is fixed.
Keep previous test data and Its test code because we need
to check that libarchive can handle that wrong iso images.

SVN-Revision: 1478

16 years agoFix reading symbolic link names from a iso image.
Michihiro NAKAJIMA [Sun, 27 Sep 2009 11:43:22 +0000 (07:43 -0400)] 
Fix reading symbolic link names from a iso image.
see below here.

-- How to make a iso image of this case.
%mkdir dir
%ln -s /tmp//foo dir/symlink1
%ln -s /tmp/foo///bar dir/symlink2
%ls -la dir
total 4
drwxr-xr-x   2 xxx  xxx   512  9 20 15:09 .
drwxr-xr-x  16 xxx  xxx  1024  9 20 15:09 ..
lrwxr-xr-x   1 xxx  xxx     9  9 20 15:09 symlink1 -> /tmp//foo
lrwxr-xr-x   1 xxx  xxx    14  9 20 15:09 symlink2 -> /tmp/foo///bar
%mkisofs -R -o test.iso dir
Total translation table size: 0
Total rockridge attributes bytes: 374
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 3b524
175 extents written (0 MB)

-- On FreeBSD8.
# mount -t cd9660 /dev/`mdconfig -f test.iso` /mnt
# ls -la /mnt
total 4
drwxr-xr-x   2 xxx     xxx   2048  9 20 15:09 .
drwxr-xr-x  20 daemon  kmem   512  9 15 13:33 ..
lrwxr-xr-x   1 xxx     xxx      9  9 20 15:09 symlink1 -> /tmp//foo
lrwxr-xr-x   1 xxx     xxx     14  9 20 15:09 symlink2 -> /tmp/foo///bar

-- bsdtar cannot handle this case.
%bsdtar tvf test.iso
drwx------  0 0      0        2048  9 20 15:09 .
lrwxr-xr-x  1 1001   1001        0  9 20 15:09 symlink1 -> /foo
lrwxr-xr-x  1 1001   1001        0  9 20 15:09 symlink2 -> /bar

The ROOT component does not appear at the first component only.
mkisofs inserts ROOT components into among other components.

components of 'SL' System Use Entry of /tmp//foo are:
 flg  len
+----+----+
| 08 | 00 |    ROOT component.
+----+----+
+----+----+----+----+----+
| 00 | 03 | 't'| 'm'| 'p'|
+----+----+----+----+----+
+----+----+
| 08 | 00 |    ROOT component.
+----+----+
+----+----+----+----+----+
| 00 | 03 | 'f'| 'o'| 'o'|
+----+----+----+----+----+

components of 'SL' System Use Entry of /tmp/foo///bar are:
 flg  len
+----+----+
| 08 | 00 |    ROOT component.
+----+----+
+----+----+----+----+----+
| 00 | 03 | 't'| 'm'| 'p'|
+----+----+----+----+----+
+----+----+----+----+----+
| 00 | 03 | 'f'| 'o'| 'o'|
+----+----+----+----+----+
+----+----+
| 08 | 00 |    ROOT component.
+----+----+
+----+----+
| 08 | 00 |    ROOT component.
+----+----+
+----+----+----+----+----+
| 00 | 03 | 'b'| 'a'| 'r'|
+----+----+----+----+----+

SVN-Revision: 1477

16 years agoRework how filenames get generated so I can spend less time
Tim Kientzle [Sat, 26 Sep 2009 18:02:14 +0000 (14:02 -0400)] 
Rework how filenames get generated so I can spend less time
counting characters to try to make sense of failures.
Putting the sample filenames in a generated array removes a lot
of confusing code from the validation logic.

SVN-Revision: 1476

16 years agoFix a mis-reporting of string length when string assertions fail.
Tim Kientzle [Sat, 26 Sep 2009 18:00:47 +0000 (14:00 -0400)] 
Fix a mis-reporting of string length when string assertions fail.
Add some additional comments to clarify the canSymlink() test.

SVN-Revision: 1475

16 years agoConditionalize more symlink-related tests.
Tim Kientzle [Fri, 25 Sep 2009 06:12:46 +0000 (02:12 -0400)] 
Conditionalize more symlink-related tests.
Given the nature of this test, I suspect the whole thing should
be skipped if symlinks are unavailable...

SVN-Revision: 1474

16 years agoUse mtime tests from test harness, don't rely on stat().
Tim Kientzle [Fri, 25 Sep 2009 06:01:37 +0000 (02:01 -0400)] 
Use mtime tests from test harness, don't rely on stat().

SVN-Revision: 1473

16 years agoExercise symlink archiving only if local platform supports symlinks.
Tim Kientzle [Fri, 25 Sep 2009 05:54:39 +0000 (01:54 -0400)] 
Exercise symlink archiving only if local platform supports symlinks.

SVN-Revision: 1472

16 years agoOnly build archive_entry_copy_bhfi.c on Windows platforms that
Tim Kientzle [Fri, 25 Sep 2009 05:49:17 +0000 (01:49 -0400)] 
Only build archive_entry_copy_bhfi.c on Windows platforms that
aren't Cygwin.

Thanks to Charles Wilson for pointing this out and providing the
Makefile.am fix.

SVN-Revision: 1471

16 years agoAdd a TODO comment to remind me to come back and
Tim Kientzle [Thu, 24 Sep 2009 15:25:56 +0000 (11:25 -0400)] 
Add a TODO comment to remind me to come back and
work on the remaining issues caused by Windows broken
stat().

SVN-Revision: 1470

16 years agoUse GetFileInfoByHandle for file size on Windows, be
Tim Kientzle [Thu, 24 Sep 2009 15:18:43 +0000 (11:18 -0400)] 
Use GetFileInfoByHandle for file size on Windows, be
a bit stricter about hardlink testing on Windows.

SVN-Revision: 1469

16 years agoPrune out some unused code, simplify the hardlink
Tim Kientzle [Thu, 24 Sep 2009 15:17:13 +0000 (11:17 -0400)] 
Prune out some unused code, simplify the hardlink
creation just a bit.

SVN-Revision: 1468

16 years agoNew Windows-only support to populate an archive entry from
Tim Kientzle [Thu, 24 Sep 2009 15:16:11 +0000 (11:16 -0400)] 
New Windows-only support to populate an archive entry from
a BY_HANDLE_FILE_INFORMATION structure (which is really
the Windows version of "struct stat").

SVN-Revision: 1467

16 years agoMinor corrections to symlink tests.
Tim Kientzle [Thu, 24 Sep 2009 15:13:01 +0000 (11:13 -0400)] 
Minor corrections to symlink tests.

SVN-Revision: 1466

16 years agoFix tar archiving of hardlinks on Windows: tree.c uses
Tim Kientzle [Thu, 24 Sep 2009 15:11:32 +0000 (11:11 -0400)] 
Fix tar archiving of hardlinks on Windows:  tree.c uses
Windows stat() call which doesn't actually provide
link count or inode values.  Passing this data down into
libarchive (to avoid redundant stat() calls) meant that
hardlink detection simply failed on Windows.  Until
I can work up something better, this simply avoids passing
stat() data from tree down into libarchive on Windows.
This allows libarchive to do the GetFileInfoByHandle
which provides useful information.

SVN-Revision: 1465

16 years agoMinor test tightening.
Tim Kientzle [Thu, 24 Sep 2009 15:08:23 +0000 (11:08 -0400)] 
Minor test tightening.

SVN-Revision: 1464

16 years agoUse int64_t for storing inode values internally.
Tim Kientzle [Thu, 24 Sep 2009 15:06:56 +0000 (11:06 -0400)] 
Use int64_t for storing inode values internally.
This fixes some hardlink-detection issues on Windows:  NTFS uses 64-bit inode values, but Windows ino_t is only 16 bits.

SVN-Revision: 1463

16 years agoMore detail on failure.
Tim Kientzle [Thu, 24 Sep 2009 15:01:33 +0000 (11:01 -0400)] 
More detail on failure.

SVN-Revision: 1462

16 years agoProperly conditionalize symlink tests on canSymlink().
Tim Kientzle [Thu, 24 Sep 2009 15:00:46 +0000 (11:00 -0400)] 
Properly conditionalize symlink tests on canSymlink().

SVN-Revision: 1461

16 years agoGet more detail about cpio/test_basic failures.
Tim Kientzle [Thu, 24 Sep 2009 14:59:32 +0000 (10:59 -0400)] 
Get more detail about cpio/test_basic failures.

SVN-Revision: 1460

16 years agoOoops. Accidentally checked in some local config changes I'm using
Tim Kientzle [Mon, 14 Sep 2009 04:40:36 +0000 (00:40 -0400)] 
Ooops.  Accidentally checked in some local config changes I'm using
for debugging.

SVN-Revision: 1459

16 years agoVarious fixes to symlink-related tests:
Tim Kientzle [Mon, 14 Sep 2009 04:38:40 +0000 (00:38 -0400)] 
Various fixes to symlink-related tests:
 * canSymlink() is no longer hardwired to always return false
 * cpio/test/test_gcpio_compat now has symlink-free test archives
   for use on platforms that lack symlink support
 * several other tests have slightly finer-grained avoidance of
   checks that rely on symlink support

SVN-Revision: 1458

16 years agoFix some compiler warnings in VS9.
Tim Kientzle [Sun, 13 Sep 2009 07:05:56 +0000 (03:05 -0400)] 
Fix some compiler warnings in VS9.

SVN-Revision: 1457

16 years agoMerge cpio test refactorings into tar and libarchive test harnesses,
Tim Kientzle [Sat, 12 Sep 2009 18:08:48 +0000 (14:08 -0400)] 
Merge cpio test refactorings into tar and libarchive test harnesses,
apply a few minor reorgs to further reduce diffs among the test
harnesses, update a bunch of tests to match the harness changes,
update some comments, rewrite the gzip/gunzip platform probes to the
new "canFoo()" style, sprinkle a few new symlink support checks.  This
hasn't been tested on Windows yet, but should chip away a few more
test failures there.

SVN-Revision: 1456

16 years agoRefactor hardlink/symlink support in test harness: we now have
Tim Kientzle [Sat, 12 Sep 2009 05:24:28 +0000 (01:24 -0400)] 
Refactor hardlink/symlink support in test harness:  we now have
assertIsHardlink() and assertIsNotHardlink().  On the symlink side,
I've added a run-time platform probe canSymlink() that tests the
local platform the first time it is called and remembers the result.
As an experiment, refactor test_basic.c to omit symlinks from the
tests if the current platform lacks symlink support.

SVN-Revision: 1455

16 years agoNew libarchive test for symlink restores.
Tim Kientzle [Sat, 12 Sep 2009 04:45:01 +0000 (00:45 -0400)] 
New libarchive test for symlink restores.

SVN-Revision: 1454

16 years agoUse lstat() on Cygwin for directory walking.
Tim Kientzle [Sat, 12 Sep 2009 04:43:43 +0000 (00:43 -0400)] 
Use lstat() on Cygwin for directory walking.

SVN-Revision: 1453

16 years agoReal hardlink detection on Windows (yes, Windows stat() really does seem to be that...
Tim Kientzle [Fri, 11 Sep 2009 05:28:37 +0000 (01:28 -0400)] 
Real hardlink detection on Windows (yes, Windows stat() really does seem to be that broken!).  Also, expose the core hardlink test as a non-assertion so we can assert it false.

In particular, this fixes test_option_l on Windows.

SVN-Revision: 1452

16 years agoCheck whether platform permits filenames with control characters
Tim Kientzle [Fri, 11 Sep 2009 02:24:42 +0000 (22:24 -0400)] 
Check whether platform permits filenames with control characters
before we try to actually test with one.  In particular, this should
fix this test on Windows.  (On platforms that permit control
characters in filenames, this test verifies that the -null option
really does treat LF characters as part of a filename instead of as a
line terminator.)

Even on platforms that don't support control characters, we can
test most of the line-parsing capabilities.

SVN-Revision: 1451

16 years agoFix compiler warnings on MinGW with gcc-4.4.0
Charles Wilson [Thu, 10 Sep 2009 18:17:34 +0000 (14:17 -0400)] 
Fix compiler warnings on MinGW with gcc-4.4.0
* tar/test/main.c (assertion_file_time): Silence 'var may
be used uninitialized' warning.
* cpio/test/main.c (assertion_file_time): Silence 'var may
be used uninitialized' warning.
* libarchive/test/main.c: Don't re-#define chdir.
(assertion_file_time): Silence 'var may be used uninitialized' warning.

SVN-Revision: 1450

16 years agoPropagate the recent overhaul of libarchive/test/main.c to the tar and
Tim Kientzle [Thu, 10 Sep 2009 04:36:02 +0000 (00:36 -0400)] 
Propagate the recent overhaul of libarchive/test/main.c to the tar and
cpio test suites, update run_all_tests to take advantage of the new
default test output.

SVN-Revision: 1449

16 years agoOops. I left out the key part of the last commit.
Tim Kientzle [Thu, 10 Sep 2009 04:35:08 +0000 (00:35 -0400)] 
Oops.  I left out the key part of the last commit.

SVN-Revision: 1448

16 years agoMake the owner_parse() test quiet by having the function
Tim Kientzle [Thu, 10 Sep 2009 04:34:41 +0000 (00:34 -0400)] 
Make the owner_parse() test quiet by having the function
return an error string instead of emitting it.

SVN-Revision: 1447

16 years agoDon't use la_ prefixes in non-libarchive code.
Tim Kientzle [Thu, 10 Sep 2009 04:32:57 +0000 (00:32 -0400)] 
Don't use la_ prefixes in non-libarchive code.

SVN-Revision: 1446

16 years agoRemove some unused code; fix the build on MinGW.
Tim Kientzle [Thu, 10 Sep 2009 04:06:22 +0000 (00:06 -0400)] 
Remove some unused code; fix the build on MinGW.

SVN-Revision: 1445

16 years agoFix hardlink support on MinGW by dynamically loading
Tim Kientzle [Wed, 9 Sep 2009 05:20:35 +0000 (01:20 -0400)] 
Fix hardlink support on MinGW by dynamically loading
the CreateHardLinkW function.  This fixes the hardlink
tests in libarchive_test on MinGW and VS9.

SVN-Revision: 1444

16 years agoMatch the shared library version from FreeBSD-CURRENT.
Tim Kientzle [Wed, 9 Sep 2009 01:52:18 +0000 (21:52 -0400)] 
Match the shared library version from FreeBSD-CURRENT.

SVN-Revision: 1443

16 years agoFrom FreeBSD r196961: Updates to iso9660 tests and improved comments
Tim Kientzle [Wed, 9 Sep 2009 01:50:49 +0000 (21:50 -0400)] 
From FreeBSD r196961: Updates to iso9660 tests and improved comments
explaining the iso9660 hardlink handling.

SVN-Revision: 1442

16 years agoReading zip archives failed if you only gave
Tim Kientzle [Tue, 8 Sep 2009 03:47:47 +0000 (23:47 -0400)] 
Reading zip archives failed if you only gave
archive_read_support_format_zip() because of a bug in how the
read-ahead logic handled read(0) requests.  Change the compat_zip test
to exercise this case and fix the underlying bug.

Thanks to:  Ed Schouten and Roman Divacky

SVN-Revision: 1441

16 years agoMicrosoft stat() is broken (always returns nlinks==1), so use GetFileInformationByHan...
Tim Kientzle [Mon, 7 Sep 2009 07:15:12 +0000 (03:15 -0400)] 
Microsoft stat() is broken (always returns nlinks==1), so use GetFileInformationByHandle() instead when testing hardlink operations.

SVN-Revision: 1440

16 years agoEnsure autogen.sh invokes autotools in same order,
Charles Wilson [Mon, 7 Sep 2009 00:17:35 +0000 (20:17 -0400)] 
Ensure autogen.sh invokes autotools in same order,
and with same arguments, as autoreconf.

SVN-Revision: 1439

16 years agoUse the link() emulation.
Tim Kientzle [Sun, 6 Sep 2009 18:49:10 +0000 (14:49 -0400)] 
Use the link() emulation.

SVN-Revision: 1438

16 years agoUse the new file assertions in this test. This doesn't actually fix anything, but...
Tim Kientzle [Sun, 6 Sep 2009 18:39:56 +0000 (14:39 -0400)] 
Use the new file assertions in this test.   This doesn't actually fix anything, but makes the failures a little more clear.

SVN-Revision: 1437

16 years agoRemove some unused code.
Tim Kientzle [Sun, 6 Sep 2009 18:15:11 +0000 (14:15 -0400)] 
Remove some unused code.

SVN-Revision: 1436

16 years agoWe have a symlink() emulation on Windows. Use it.
Tim Kientzle [Sun, 6 Sep 2009 18:14:09 +0000 (14:14 -0400)] 
We have a symlink() emulation on Windows.  Use it.

SVN-Revision: 1435

16 years agoBuild fix & slight increase in -v detail.
Tim Kientzle [Sun, 6 Sep 2009 18:13:36 +0000 (14:13 -0400)] 
Build fix & slight increase in -v detail.

SVN-Revision: 1434

16 years agoMore detail about this failure.
Tim Kientzle [Sun, 6 Sep 2009 18:12:41 +0000 (14:12 -0400)] 
More detail about this failure.

SVN-Revision: 1433

16 years agoFix Windows time tests.
Tim Kientzle [Sun, 6 Sep 2009 06:55:10 +0000 (02:55 -0400)] 
Fix Windows time tests.

SVN-Revision: 1432

16 years agoAdd new assertions to verify atime, birthtime, and mtime, both
Tim Kientzle [Sun, 6 Sep 2009 06:44:40 +0000 (02:44 -0400)] 
Add new assertions to verify atime, birthtime, and mtime, both
for exact values and "recent".  Sketch in support for FreeBSD
(including high-res), Windows (including high-res and birthtime),
and generic POSIX.

Inspired in part by the discovery that stat() on Windows shifts mtime
values depending on DST settings, so the old code that used stat()
breaks in weird ways on Windows.  GetFileTime() seems to not have this
problem, but using that requires that we not use stat().

SVN-Revision: 1431

16 years agoFix some assertions to use logprintf.
Tim Kientzle [Sun, 6 Sep 2009 04:26:46 +0000 (00:26 -0400)] 
Fix some assertions to use logprintf.

SVN-Revision: 1430

16 years agoUpdate FreeBSD Makefiles with new zisofs work.
Tim Kientzle [Sun, 6 Sep 2009 02:24:09 +0000 (22:24 -0400)] 
Update FreeBSD Makefiles with new zisofs work.

SVN-Revision: 1429

16 years agoInternal renaming in main.c requires matching changes to test.h.
Tim Kientzle [Sun, 6 Sep 2009 02:23:40 +0000 (22:23 -0400)] 
Internal renaming in main.c requires matching changes to test.h.

SVN-Revision: 1428

16 years agoExtensive reorg of main.c.
Tim Kientzle [Sun, 6 Sep 2009 02:22:56 +0000 (22:22 -0400)] 
Extensive reorg of main.c.

SVN-Revision: 1427

16 years agoFix my silly bug; I didn't consider that a uncompressed file
Michihiro NAKAJIMA [Sun, 6 Sep 2009 01:36:23 +0000 (21:36 -0400)] 
Fix my silly bug; I didn't consider that a uncompressed file
size was just 1 << log2_bs.

SVN-Revision: 1426

16 years agoDon't try to do exact mode checks on Windows, since
Tim Kientzle [Sat, 5 Sep 2009 06:10:52 +0000 (02:10 -0400)] 
Don't try to do exact mode checks on Windows, since
Windows filesystems don't match Posix permissions.

SVN-Revision: 1425

16 years agoFix cpio build on MinGW if CreateHardLinkW is unavailable.
Tim Kientzle [Sat, 5 Sep 2009 02:48:51 +0000 (22:48 -0400)] 
Fix cpio build on MinGW if CreateHardLinkW is unavailable.

SVN-Revision: 1424

16 years agoProbe for CreateHardLinkW and use it only if it's found.
Tim Kientzle [Sat, 5 Sep 2009 02:41:09 +0000 (22:41 -0400)] 
Probe for CreateHardLinkW and use it only if it's found.
(Needed for MinGW, which doesn't have new enough Windows
headers to compile calls to CreateHardLinkW.)

SVN-Revision: 1423

16 years agoRefine win32 api checks and usage.
Charles Wilson [Fri, 4 Sep 2009 06:11:54 +0000 (02:11 -0400)] 
Refine win32 api checks and usage.

* tar/bsdtar_windows.c: Remove WINVER, _WIN32_WINNT defines.
(wequallen): Remove unused function.
(canHardLinkW): Ditto.
* cpio/cpio_windows.c: Remove WINVER, _WIN32_WINNT defines.
* libarchive/archive_windows.c: Remove WINVER, _WIN32_WINNT defines.
* configure.ac [mingw|cygwin]: Add WINVER and _WIN32_WINNT defines
to config.h. Use new AC_CHECK_STDCALL_FUNC macro to check for
CreateHardLinkA symbol. Don't check for CreateSymbolicLink symbol.
* CMakeLists.txt [WIN32]: Add WINVER and _WIN32_WINNT defines to cache.
Check for CreateHardLinkA symbol, not CreateHardLink. Don't check for
CreateSymbolicLink.
* build/autoconf/check_stdcall_func.m4: New.

SVN-Revision: 1422

16 years agoDon't report a negative error code as a count of available bytes.
Tim Kientzle [Fri, 4 Sep 2009 04:21:50 +0000 (00:21 -0400)] 
Don't report a negative error code as a count of available bytes.
In this case, any error means there are zero bytes available.

SVN-Revision: 1420

16 years agoUse a binary heap instead of an unsorted list to track unvisited
Tim Kientzle [Fri, 4 Sep 2009 04:19:01 +0000 (00:19 -0400)] 
Use a binary heap instead of an unsorted list to track unvisited
entries in ISO images.  This makes "tar tvf" up to 10 times faster.

SVN-Revision: 1419

16 years agostat() has two arguments. Harumph.
Tim Kientzle [Thu, 3 Sep 2009 05:16:11 +0000 (01:16 -0400)] 
stat() has two arguments.  Harumph.

SVN-Revision: 1418

16 years agoRewrite stat() calls on Windows, but not struct stat references.
Tim Kientzle [Thu, 3 Sep 2009 05:12:13 +0000 (01:12 -0400)] 
Rewrite stat() calls on Windows, but not struct stat references.

SVN-Revision: 1417