]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
15 years agoExtend the fuzz tester:
Tim Kientzle [Sun, 1 Nov 2009 21:49:53 +0000 (16:49 -0500)] 
Extend the fuzz tester:
 * Test gzip reader
 * Test xz reader
 * Test cpio_bin format

SVN-Revision: 1571

15 years agoExtend the fuzz tester:
Tim Kientzle [Sun, 1 Nov 2009 21:46:24 +0000 (16:46 -0500)] 
Extend the fuzz tester:
 * Compress test_fuzz_1.iso so we can save space in source control and so we can fuzz a compressed file.
 * Extract the "ar" sample file so we can use it in the fuzz tester.

SVN-Revision: 1570

15 years agoUse the format_raw handler to decompress files before trying to
Tim Kientzle [Sun, 1 Nov 2009 18:07:03 +0000 (13:07 -0500)] 
Use the format_raw handler to decompress files before trying to
fuzz them.  This will allow us to re-use more of the ISO sample files,
for instance.

SVN-Revision: 1569

15 years ago-vvv should be full verbosity just like -vv.
Tim Kientzle [Sun, 1 Nov 2009 18:05:18 +0000 (13:05 -0500)] 
-vvv should be full verbosity just like -vv.

SVN-Revision: 1568

15 years agoDo not reject a directory entry which couldn't find the original place of
Michihiro NAKAJIMA [Sun, 1 Nov 2009 08:47:46 +0000 (03:47 -0500)] 
Do not reject a directory entry which couldn't find the original place of
itself.

SVN-Revision: 1567

15 years agoThe file queue which has "CL" extension(called cl_files) must use its
Michihiro NAKAJIMA [Sun, 1 Nov 2009 07:46:57 +0000 (02:46 -0500)] 
The file queue which has "CL" extension(called cl_files) must use its
cl_offset(which indicates a offset of the relocated directory entry)
for heap key. The function relocate_dir()'s algorithm expects cl_files
in order of cl_offset.

SVN-Revision: 1566

15 years agoMake the __FBSDID() handling more platform-agnostic by using
Tim Kientzle [Sun, 1 Nov 2009 06:56:20 +0000 (01:56 -0500)] 
Make the __FBSDID() handling more platform-agnostic by using
HAVE_SYS_CDEFS_H to control the inclusion of sys/cdefs.h and
defining a fake __FBSDID() macro if we need one.  In particular,
this deals a lot more gracefully with systems that are not
FreeBSD but use FreeBSD-derived system headers.

See Issue 46 on libarchive.googlecode.com for discussion.
Submitted by: cpr420

SVN-Revision: 1565

15 years agoWhitespace fix.
Tim Kientzle [Sun, 1 Nov 2009 06:48:39 +0000 (01:48 -0500)] 
Whitespace fix.

SVN-Revision: 1564

15 years agoAvoid %j and uintmax in cpio.
Tim Kientzle [Sun, 1 Nov 2009 02:36:25 +0000 (22:36 -0400)] 
Avoid %j and uintmax in cpio.

SVN-Revision: 1563

15 years agoTrying to figure out what printf modifiers to use on what platforms to
Tim Kientzle [Sun, 1 Nov 2009 02:14:14 +0000 (22:14 -0400)] 
Trying to figure out what printf modifiers to use on what platforms to
display 64-bit values is getting to be  real PITA.  Just roll our
own conversion and use that.

SVN-Revision: 1562

15 years agoGet int64_t on Haiku.
Tim Kientzle [Sat, 31 Oct 2009 22:47:51 +0000 (18:47 -0400)] 
Get int64_t on Haiku.

SVN-Revision: 1561

15 years agoBe a little more selective when verifying mode values. In particular,
Tim Kientzle [Sat, 31 Oct 2009 22:45:33 +0000 (18:45 -0400)] 
Be a little more selective when verifying mode values.  In particular,
ignore extra high-order bits that are added by Haiku's BFS filesystem.

SVN-Revision: 1560

15 years agoWindows build fix.
Tim Kientzle [Sat, 31 Oct 2009 20:03:25 +0000 (16:03 -0400)] 
Windows build fix.

SVN-Revision: 1559

15 years agoarchive_entry_copy_bhfi should only be built on Windows.
Tim Kientzle [Sat, 31 Oct 2009 19:24:09 +0000 (15:24 -0400)] 
archive_entry_copy_bhfi should only be built on Windows.

SVN-Revision: 1558

15 years agoFix some compiler warnings: Mostly just removing unused parameters.
Tim Kientzle [Sat, 31 Oct 2009 17:35:00 +0000 (13:35 -0400)] 
Fix some compiler warnings: Mostly just removing unused parameters.

SVN-Revision: 1557

15 years agoSkip hardlink checks on Haiku, remove some ancient hacks to get
Tim Kientzle [Sat, 31 Oct 2009 17:19:37 +0000 (13:19 -0400)] 
Skip hardlink checks on Haiku, remove some ancient hacks to get
libarchive_test to work against libarchive pre-1.9.

SVN-Revision: 1556

15 years agoSkip the root uname test on both Cygwin and Haiku (neither of which has
Tim Kientzle [Sat, 31 Oct 2009 17:18:31 +0000 (13:18 -0400)] 
Skip the root uname test on both Cygwin and Haiku (neither of which has
predictable usernames for UID 0, so this test doesn't work on either one).

SVN-Revision: 1555

15 years agoTweak for Haiku.
Tim Kientzle [Sat, 31 Oct 2009 17:17:14 +0000 (13:17 -0400)] 
Tweak for Haiku.

SVN-Revision: 1554

15 years agoShuffle the major/minor/makedev support a bit; this should work
Tim Kientzle [Sat, 31 Oct 2009 17:16:37 +0000 (13:16 -0400)] 
Shuffle the major/minor/makedev support a bit; this should work
on both Windows and Haiku.

SVN-Revision: 1553

15 years agoSynchronize the test harnesses and force atime tests to always pass
Tim Kientzle [Sat, 31 Oct 2009 17:14:50 +0000 (13:14 -0400)] 
Synchronize the test harnesses and force atime tests to always pass
on Haiku (which doesn't support atime).

SVN-Revision: 1552

15 years agoAdd extra text before the uuencoded data.
Michihiro NAKAJIMA [Sat, 31 Oct 2009 05:37:10 +0000 (01:37 -0400)] 
Add extra text before the uuencoded data.

SVN-Revision: 1551

15 years agoBug fix. Bidding failed when a character of the end of buffer which
Michihiro NAKAJIMA [Sat, 31 Oct 2009 05:03:48 +0000 (01:03 -0400)] 
Bug fix. Bidding failed when a character of the end of buffer which
was checked for bidding was '\n' but not the end of file.

SVN-Revision: 1550

15 years agoImprove directory order; make sure a directory entry is exposed
Michihiro NAKAJIMA [Sat, 31 Oct 2009 03:13:50 +0000 (23:13 -0400)] 
Improve directory order; make sure a directory entry is exposed
after its parent especially sub directories under the rr_moved
directory.

SVN-Revision: 1549

15 years agoFix a bug; use relevant function for reading create time.
Michihiro NAKAJIMA [Fri, 30 Oct 2009 12:22:36 +0000 (08:22 -0400)] 
Fix a bug; use relevant function for reading create time.

SVN-Revision: 1548

15 years agoAdd a test uudecode filter decodes a data of the Base64 encoding.
Michihiro NAKAJIMA [Fri, 30 Oct 2009 10:46:33 +0000 (06:46 -0400)] 
Add a test uudecode filter decodes a data of the Base64 encoding.

SVN-Revision: 1547

15 years agoMake sure a line is fully read before checking it for bidding
Michihiro NAKAJIMA [Fri, 30 Oct 2009 10:31:07 +0000 (06:31 -0400)] 
Make sure a line is fully read before checking it for bidding
for uudecode.

SVN-Revision: 1546

15 years agoMake sure uudecode filter handles lines which are broken
Michihiro NAKAJIMA [Fri, 30 Oct 2009 06:57:36 +0000 (02:57 -0400)] 
Make sure uudecode filter handles lines which are broken
across multiple reads.

Suggested by Tim.

SVN-Revision: 1545

15 years agoMore sanity check for ISO 9660.
Michihiro NAKAJIMA [Thu, 22 Oct 2009 06:05:57 +0000 (02:05 -0400)] 
More sanity check for ISO 9660.
Add check for Enhanced Volume Descriptor and other Supplementary Volume
Descriptor.

SVN-Revision: 1543

15 years agoAdd uudecode filter.
Michihiro NAKAJIMA [Tue, 20 Oct 2009 06:16:28 +0000 (02:16 -0400)] 
Add uudecode filter.

SVN-Revision: 1542

15 years agoSet return parameters.
Michihiro NAKAJIMA [Sun, 18 Oct 2009 05:31:20 +0000 (01:31 -0400)] 
Set return parameters.

SVN-Revision: 1541

15 years agoFix memory leak.
Michihiro NAKAJIMA [Sun, 18 Oct 2009 04:47:49 +0000 (00:47 -0400)] 
Fix memory leak.

SVN-Revision: 1540

15 years agoImprove queueing SUSP "CE" requests; it uses heapsort for performance now.
Michihiro NAKAJIMA [Fri, 16 Oct 2009 19:35:40 +0000 (15:35 -0400)] 
Improve queueing SUSP "CE" requests; it uses heapsort for performance now.

SVN-Revision: 1539

15 years agoFile size is no longer needed to check whether we have to set hardlink
Michihiro NAKAJIMA [Fri, 16 Oct 2009 17:08:47 +0000 (13:08 -0400)] 
File size is no longer needed to check whether we have to set hardlink
information to the file or not.

SVN-Revision: 1538

15 years agoAdd support for multi extent.
Michihiro NAKAJIMA [Fri, 16 Oct 2009 16:42:36 +0000 (12:42 -0400)] 
Add support for multi extent.

e.g.
-- Reuslt of previous bsdtar.
%bsdtar tvf test_read_format_iso_multi_extent.iso
dr-xr-xr-x  2 1      2        2048  1  2  1970 .
-r--r--r--  1 1      2      129024  1  2  1970 file
-r--r--r--  1 1      2      129024  1  2  1970 file
-r--r--r--  1 1      2        4232  1  2  1970 file

-- After patch.
%bsdtar tvf test_read_format_iso_multi_extent.iso
dr-xr-xr-x  2 1      2        2048  1  2  1970 .
-r--r--r--  1 1      2      262280  1  2  1970 file

SVN-Revision: 1537

15 years agosvn:ignore Makefiles in these directories.
Tim Kientzle [Fri, 16 Oct 2009 05:54:32 +0000 (01:54 -0400)] 
svn:ignore Makefiles in these directories.
In particular, let's try not to have anyone accidentally checkin the
cmake-generated Makefiles.

SVN-Revision: 1536

15 years agoRemove the FreeBSD-specific Makefiles.
Tim Kientzle [Fri, 16 Oct 2009 05:51:37 +0000 (01:51 -0400)] 
Remove the FreeBSD-specific Makefiles.

SVN-Revision: 1535

15 years agoWindows build fixes from Bill Hoffman.
Tim Kientzle [Fri, 16 Oct 2009 03:54:55 +0000 (23:54 -0400)] 
Windows build fixes from Bill Hoffman.

SVN-Revision: 1534

15 years agoFile size is no longer used in heapsort; next_cache_entry function
Michihiro NAKAJIMA [Fri, 16 Oct 2009 00:03:07 +0000 (20:03 -0400)] 
File size is no longer used in heapsort; next_cache_entry function
can recogize that there are empty files among hardlink files which
are not empty.

SVN-Revision: 1533

15 years agoWhen location has negative value, it can be used for file number.
Michihiro NAKAJIMA [Thu, 15 Oct 2009 22:00:43 +0000 (18:00 -0400)] 
When location has negative value, it can be used for file number.

SVN-Revision: 1532

15 years agoUnify cache_files and pending_dirs.
Michihiro NAKAJIMA [Thu, 15 Oct 2009 15:58:08 +0000 (11:58 -0400)] 
Unify cache_files and pending_dirs.

SVN-Revision: 1531

15 years agoHeap routine is converted to be common function so that
Michihiro NAKAJIMA [Thu, 15 Oct 2009 14:28:09 +0000 (10:28 -0400)] 
Heap routine is converted to be common function so that
iso9660->re_dirs and iso9660->cl_fiels use it for performance.

SVN-Revision: 1530

15 years agoImprove handling of Rockridge extensions' rr_moved directory and
Michihiro NAKAJIMA [Thu, 15 Oct 2009 11:37:18 +0000 (07:37 -0400)] 
Improve handling of Rockridge extensions' rr_moved directory and
following sub directories.
Add corresponding test.
Unfortunately, some tests need tweaks due to difference of ordering of
hardlink files(which have the same offset); it's characteristic of heap.

SVN-Revision: 1529

15 years agoSlightly simplify reading Directory Record.
Michihiro NAKAJIMA [Thu, 15 Oct 2009 11:14:18 +0000 (07:14 -0400)] 
Slightly simplify reading Directory Record.

SVN-Revision: 1528

15 years agoMinor fix.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 19:11:27 +0000 (15:11 -0400)] 
Minor fix.

SVN-Revision: 1527

15 years agoTell user about SUSP "CE" extension has invalid value if occur.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 19:06:28 +0000 (15:06 -0400)] 
Tell user about SUSP "CE" extension has invalid value if occur.

SVN-Revision: 1526

15 years agoSiplify some code.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 18:16:28 +0000 (14:16 -0400)] 
Siplify some code.

SVN-Revision: 1525

15 years agoSplit reading data which is recorded by SUSP CE extension.
Michihiro NAKAJIMA [Wed, 14 Oct 2009 16:43:55 +0000 (12:43 -0400)] 
Split reading data which is recorded by SUSP CE extension.

SVN-Revision: 1524

15 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

15 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

15 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

15 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

15 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

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

SVN-Revision: 1518

15 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

15 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

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

SVN-Revision: 1515

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

SVN-Revision: 1514

15 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

15 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

15 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

15 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

15 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

15 years agoMerge doc update r1507 from trunk.
Tim Kientzle [Mon, 12 Oct 2009 00:27:54 +0000 (20:27 -0400)] 
Merge doc update r1507 from trunk.

SVN-Revision: 1508

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

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

SVN-Revision: 1494

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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