]> git.ipfire.org Git - thirdparty/libarchive.git/log
thirdparty/libarchive.git
11 years agoVerify that Zip writer rejects too-large files when Zip64 is disabled. 62/head
Tim Kientzle [Sun, 12 Jan 2014 19:45:53 +0000 (11:45 -0800)] 
Verify that Zip writer rejects too-large files when Zip64 is disabled.

Interestingly, this found a bug in the write core:  if the
writer rejects a file, the write core would erroneously transition to
state DATA.

11 years agoVerify the end-of-archive information as part of the large zip test.
Tim Kientzle [Sun, 12 Jan 2014 19:21:02 +0000 (11:21 -0800)] 
Verify the end-of-archive information as part of the large zip test.

Fix a bug that breaks compat with Info-Zip 'unzip' program.

11 years agoMerge branch 'master' of github.com:kientzle/libarchive-zip64
Tim Kientzle [Sun, 12 Jan 2014 17:18:57 +0000 (09:18 -0800)] 
Merge branch 'master' of github.com:kientzle/libarchive-zip64

11 years agoOnly enable the still-experimental 'el' extra block
Tim Kientzle [Thu, 9 Jan 2014 05:20:10 +0000 (21:20 -0800)] 
Only enable the still-experimental 'el' extra block
if option 'zip:experimental' is specified.
This should limit the use of this option until the
final format is actually nailed down.

11 years agoChange new extra block from 'LA' to 'el' to follow updated draft spec
Tim Kientzle [Fri, 3 Jan 2014 03:25:02 +0000 (19:25 -0800)] 
Change new extra block from 'LA' to 'el' to follow updated draft spec

11 years agoAdd a bitmap to indicate which fields are included for compression and for future...
Tim Kientzle [Thu, 2 Jan 2014 14:14:20 +0000 (06:14 -0800)] 
Add a bitmap to indicate which fields are included for compression and for future expansion

11 years agoChange the first field of the 'LA' extra block to the full 'version made by'
Tim Kientzle [Tue, 31 Dec 2013 18:11:48 +0000 (10:11 -0800)] 
Change the first field of the 'LA' extra block to the full 'version made by'

11 years agoImprove memory management in the large zip test
Tim Kientzle [Tue, 31 Dec 2013 17:54:34 +0000 (09:54 -0800)] 
Improve memory management in the large zip test

11 years agoOnly write the new 'LA' experimental extra block if it's explicitly enabled.
Tim Kientzle [Tue, 31 Dec 2013 17:19:52 +0000 (09:19 -0800)] 
Only write the new 'LA' experimental extra block if it's explicitly enabled.
Enable it in the appropriate tests.

E.g.,

$ bsdtar cf - --format=zip --option zip:experimental .

The syntax supports multiple experiments;
use --option zip:experiment_la to enable just the 'LA' experiment.

11 years agoA couple of changes to the experimental new extra block, as suggested by Steven Schweda.
Tim Kientzle [Tue, 31 Dec 2013 04:51:26 +0000 (20:51 -0800)] 
A couple of changes to the experimental new extra block, as suggested by Steven Schweda.

 * Name changed from 'at' to 'LA' (Local Attributes)
 * Trimmed 'version made by' down to just 1 byte system code

11 years agoSupport experimental "at" extra block for better streaming.
Tim Kientzle [Mon, 30 Dec 2013 04:57:17 +0000 (20:57 -0800)] 
Support experimental "at" extra block for better streaming.

The writer now writes this extra block with every local
file header; the reader recognizes it and uses it.
This allows streaming extraction to properly restore
file permissions and symlinks.

Without this, streaming extraction of Zip archives is
somewhat hobbled by the lack of full information in
the local file header.

Here's a detailed description of the new extra block.
The details here are subject to change at any time.

   -Extended Local File Header Extra Field (0x7461):

      The following is the layout of the extended local file
      header "extra" block.  This allows information to be
      included with the local file header that could previously
      only be stored with the central directory file header.

      Note: all fields stored in Intel low-byte/high-byte order.

        Value      Size       Description
        -----      ----       -----------
        0x7461     2 bytes    Tag for this "extra" block type
        Size       2 bytes    Size of this "extra" block
        Version
        Made By    2 bytes    See "Version Made By" above
        Internal File
        Attributes 2 bytes    See "Internal File Attributes" above
        External File
        Attributes 4 bytes    See "External File Attributes" above

      This extra block should only be used with the local
      file header.  The values stored should exactly match
      the corresponding values in the central directory
      file header.

11 years agoComment the definitive Zip documentation for future maintainers; note the history...
Tim Kientzle [Sun, 29 Dec 2013 22:26:21 +0000 (14:26 -0800)] 
Comment the definitive Zip documentation for future maintainers; note the history of this code.

11 years agoConvert some booleans into more compact bitfields
Tim Kientzle [Sun, 29 Dec 2013 22:05:17 +0000 (14:05 -0800)] 
Convert some booleans into more compact bitfields

11 years agoMore code rearranging
Tim Kientzle [Sun, 29 Dec 2013 21:29:38 +0000 (13:29 -0800)] 
More code rearranging

11 years agoUpdate some comments, fine-tune the streaming bid
Tim Kientzle [Sun, 29 Dec 2013 19:37:24 +0000 (11:37 -0800)] 
Update some comments, fine-tune the streaming bid

11 years agoRemove some redundant vars; more code reorg
Tim Kientzle [Sun, 29 Dec 2013 19:21:54 +0000 (11:21 -0800)] 
Remove some redundant vars; more code reorg

11 years agoOptimize skipping entries in seeking mode
Tim Kientzle [Sun, 29 Dec 2013 18:45:41 +0000 (10:45 -0800)] 
Optimize skipping entries in seeking mode

11 years agoClarify the wording.
Tim Kientzle [Sun, 29 Dec 2013 18:36:06 +0000 (10:36 -0800)] 
Clarify the wording.

11 years agoEliminate zip reader's redundant tracking of file position (the archive already does...
Tim Kientzle [Sun, 29 Dec 2013 03:50:07 +0000 (19:50 -0800)] 
Eliminate zip reader's redundant tracking of file position (the archive already does this).

11 years agoMake zip->offset tracking more consistent.
Tim Kientzle [Sun, 29 Dec 2013 03:27:33 +0000 (19:27 -0800)] 
Make zip->offset tracking more consistent.

11 years agoFix large zip test in streaming mode.
Tim Kientzle [Sun, 29 Dec 2013 03:17:24 +0000 (19:17 -0800)] 
Fix large zip test in streaming mode.

11 years agoReturn uncompressed size if it's known, even if compressed size and/or CRC are deferred.
Tim Kientzle [Sat, 28 Dec 2013 23:58:36 +0000 (15:58 -0800)] 
Return uncompressed size if it's known, even if compressed size and/or CRC are deferred.

11 years agoSkip stored data quickly when size is known at beginning even when CRC is at end
Tim Kientzle [Sat, 28 Dec 2013 23:36:36 +0000 (15:36 -0800)] 
Skip stored data quickly when size is known at beginning even when CRC is at end

11 years agoUpdate some comments
Tim Kientzle [Sat, 28 Dec 2013 23:30:04 +0000 (15:30 -0800)] 
Update some comments

11 years agoExtend large zip test to cover streaming reader as well.
Tim Kientzle [Sat, 28 Dec 2013 23:13:59 +0000 (15:13 -0800)] 
Extend large zip test to cover streaming reader as well.

11 years agoExpand the large zip test a bit
Tim Kientzle [Sat, 28 Dec 2013 21:40:47 +0000 (13:40 -0800)] 
Expand the large zip test a bit

11 years agoParse out the extra data before trying to insert into the tree.
Tim Kientzle [Sat, 28 Dec 2013 21:36:56 +0000 (13:36 -0800)] 
Parse out the extra data before trying to insert into the tree.

Since the tree is organized by offset, we
need the full offset from the extra data
(in the case of 64-bit offsets) before we do the
insertion.

While here, fix an obvious blooper: initialize the CRC function.

11 years agoTest for large Zip archives, following code for large Tar test.
Tim Kientzle [Sat, 28 Dec 2013 09:45:32 +0000 (01:45 -0800)] 
Test for large Zip archives, following code for large Tar test.
Fix several bugs:
 * comparison function for ordering entries in reader was wrong
 * writer wasn't including 64-bit sizes for entries of exactly 0xffffffff bytes
Also, add options to suppress CRC calculations and checks
(otherwise, this test spends a *lot* of time in CRC routines).

11 years agoRead Zip64 EOCD; work around an Info-Zip bug.
Tim Kientzle [Fri, 27 Dec 2013 08:41:48 +0000 (00:41 -0800)] 
Read Zip64 EOCD; work around an Info-Zip bug.

11 years agoFix whitespace
Tim Kientzle [Fri, 27 Dec 2013 07:17:29 +0000 (23:17 -0800)] 
Fix whitespace

11 years agoFinish the detailed verification of zip archive with single entry for both zip64...
Tim Kientzle [Fri, 27 Dec 2013 07:00:30 +0000 (23:00 -0800)] 
Finish the detailed verification of zip archive with single entry for both zip64 and non-zip64 cases.
Fix a few minor issues this uncovers.

11 years agoTest detailed zip format for regular file entry.
Tim Kientzle [Fri, 27 Dec 2013 03:52:53 +0000 (19:52 -0800)] 
Test detailed zip format for regular file entry.
Fix tests when built w/o zlib.

11 years agoDon't try to verify deflated data if zlib is unavailable.
Tim Kientzle [Fri, 27 Dec 2013 03:39:59 +0000 (19:39 -0800)] 
Don't try to verify deflated data if zlib is unavailable.

11 years agoRename write/read round-trip test.
Tim Kientzle [Fri, 27 Dec 2013 01:55:05 +0000 (17:55 -0800)] 
Rename write/read round-trip test.

11 years agoComment this test a little bit.
Tim Kientzle [Thu, 26 Dec 2013 23:43:58 +0000 (15:43 -0800)] 
Comment this test a little bit.

11 years agoTest that we can read the Zip64 extensions that we write.
Tim Kientzle [Thu, 26 Dec 2013 23:40:06 +0000 (15:40 -0800)] 
Test that we can read the Zip64 extensions that we write.

11 years agoBe more careful about enabling zip64 (fixes zip_compression_store test)
Tim Kientzle [Thu, 26 Dec 2013 23:29:52 +0000 (15:29 -0800)] 
Be more careful about enabling zip64 (fixes zip_compression_store test)
Add test for empty zip64 file
Fix reader to read empty zip64 files

11 years agoMore error reporting on these assertions.
Tim Kientzle [Thu, 26 Dec 2013 23:27:05 +0000 (15:27 -0800)] 
More error reporting on these assertions.

11 years agoAdjust expected permissions; zip code has slightly tightened
Tim Kientzle [Thu, 26 Dec 2013 22:02:03 +0000 (14:02 -0800)] 
Adjust expected permissions; zip code has slightly tightened
the default permissions used when extracting files.

11 years agoFix all current tests:
Tim Kientzle [Thu, 26 Dec 2013 21:59:55 +0000 (13:59 -0800)] 
Fix all current tests:
 * When searching for start of Central directory, DTRT if there are no entries.
 * Find end-of-archive marker when it is exactly at end of file
 * Recognize zip64 central directory locator (not yet fully parsed)
 * Don't return entry size if length-at-end, even if size looks reasonable

11 years agoOut-of-range seeks should fail, not truncate the seek.
Tim Kientzle [Thu, 26 Dec 2013 21:59:00 +0000 (13:59 -0800)] 
Out-of-range seeks should fail, not truncate the seek.

11 years agoSet compiler flags for Clang.
Tim Kientzle [Thu, 26 Dec 2013 21:58:41 +0000 (13:58 -0800)] 
Set compiler flags for Clang.

11 years agoBreak Zip compatibility test into 5 separate tests.
Tim Kientzle [Thu, 26 Dec 2013 21:57:26 +0000 (13:57 -0800)] 
Break Zip compatibility test into 5 separate tests.

11 years agoFix mismatched sign warning
Tim Kientzle [Thu, 26 Dec 2013 19:20:04 +0000 (11:20 -0800)] 
Fix mismatched sign warning

11 years agoFix warnings: mismatched signs, unused variables.
Tim Kientzle [Thu, 26 Dec 2013 19:19:16 +0000 (11:19 -0800)] 
Fix warnings:  mismatched signs, unused variables.

11 years agoMerge branch 'master' of github.com:kientzle/libarchive-zip64
Tim Kientzle [Wed, 25 Dec 2013 17:57:37 +0000 (09:57 -0800)] 
Merge branch 'master' of github.com:kientzle/libarchive-zip64

11 years agoFix typo
Tim Kientzle [Wed, 25 Dec 2013 01:32:33 +0000 (17:32 -0800)] 
Fix typo

11 years agoMerge recent changes from libarchive master repository.
Tim Kientzle [Wed, 25 Dec 2013 01:25:55 +0000 (17:25 -0800)] 
Merge recent changes from libarchive master repository.

11 years agoCleanups for zip64 support
Tim Kientzle [Wed, 25 Dec 2013 01:24:41 +0000 (17:24 -0800)] 
Cleanups for zip64 support

11 years agoMove the strsep() implementation to the mtree reader, which is
Tim Kientzle [Wed, 25 Dec 2013 01:13:30 +0000 (17:13 -0800)] 
Move the strsep() implementation to the mtree reader, which is
the only place it's used.

11 years agoHarmless typo in a comment. 56/head
NiLuJe [Tue, 24 Dec 2013 18:08:44 +0000 (19:08 +0100)] 
Harmless typo in a comment.

11 years agoMerge branch 'master' into fix-mingw
NiLuJe [Tue, 24 Dec 2013 17:49:48 +0000 (18:49 +0100)] 
Merge branch 'master' into fix-mingw

11 years agoMerge pull request #57 from NiLuJe/fix-has_encrypted_entries
Tim Kientzle [Tue, 24 Dec 2013 06:55:49 +0000 (22:55 -0800)] 
Merge pull request #57 from NiLuJe/fix-has_encrypted_entries

Make sure has_encrypted_entries is a signed int

11 years agoMerge pull request #54 from NiLuJe/fix-autotools-build
Tim Kientzle [Tue, 24 Dec 2013 06:49:22 +0000 (22:49 -0800)] 
Merge pull request #54 from NiLuJe/fix-autotools-build

Fix autotools build.

11 years agoMerge pull request #53 from NiLuJe/fix-issue-317
Tim Kientzle [Tue, 24 Dec 2013 06:47:27 +0000 (22:47 -0800)] 
Merge pull request #53 from NiLuJe/fix-issue-317

Fix issue 317

11 years agoMissed two tests! 54/head
NiLuJe [Mon, 23 Dec 2013 18:57:50 +0000 (19:57 +0100)] 
Missed two tests!

(Mentioned in #58, thanks!)

11 years agoMake sure has_encrypted_entries is a signed int 57/head
NiLuJe [Mon, 23 Dec 2013 00:44:45 +0000 (01:44 +0100)] 
Make sure has_encrypted_entries is a signed int

Related to cd1740912b18f748a4f9b491a32b44c1712a7478

Trying to assign -1 (ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW)
to a data type we're not sure will always be signed is a bad idea
(blew up on ARM, for instance).

11 years agoMore MinGW trickery...
NiLuJe [Sun, 22 Dec 2013 23:04:38 +0000 (00:04 +0100)] 
More MinGW trickery...

Poor man's attempt at making 4e002d9a92ecd7cec0fb98b0bedbace8aad81f6e
play nice with MinGW.
Dry coded for the fastest solution, there's probably a much better
way to handle that sanely & properly.

11 years agoFix previous commit.
NiLuJe [Sun, 22 Dec 2013 22:31:51 +0000 (23:31 +0100)] 
Fix previous commit.

Forgot to check if cpio_windows.h actually pulled windows.h in ;p.

11 years agoFix cpio build on MinGW.
NiLuJe [Sun, 22 Dec 2013 22:26:04 +0000 (23:26 +0100)] 
Fix cpio build on MinGW.

Exact same concept as the previous commit.

11 years agoBetter fix.
NiLuJe [Sun, 22 Dec 2013 22:13:14 +0000 (23:13 +0100)] 
Better fix.

Restore e6d1e13b2880ab0e6166e5ed168df7e6e0de943b,
and make sure that we include windows.h earlier for the CLI tools.

11 years agoRevert "Remove unnecessary windows.h include"
NiLuJe [Sun, 22 Dec 2013 22:05:24 +0000 (23:05 +0100)] 
Revert "Remove unnecessary windows.h include"

This reverts commit e6d1e13b2880ab0e6166e5ed168df7e6e0de943b.

We do need this (for the CLI tools).

Fixes a build failure on MinGW:
  CC       tar/bsdtar-bsdtar.o
In file included from tar/bsdtar_platform.h:62:0,
                 from tar/bsdtar.c:26:
./libarchive/archive_entry.h:250:64: error: unknown type name 'BY_HANDLE_FILE_INFORMATION'
 __LA_DECL void archive_entry_copy_bhfi(struct archive_entry *, BY_HANDLE_FILE_INFORMATION *);
                                                                ^

11 years agoFix issue 317 53/head
NiLuJe [Sun, 22 Dec 2013 17:43:18 +0000 (18:43 +0100)] 
Fix issue 317

This is the exact same fix as mentionne din the GC issue,
cf. https://code.google.com/p/libarchive/issues/detail?id=317

11 years agoFix autotools build.
NiLuJe [Sun, 22 Dec 2013 17:41:16 +0000 (18:41 +0100)] 
Fix autotools build.

Follows commits 4e002d9a92ecd7cec0fb98b0bedbace8aad81f6e &
7a90710e0d3c786cf4f3af2457a815db6c9b5a5a that only handled CMake.

11 years agoStyle: Use 'int' not 'char' for status return types.
Tim Kientzle [Fri, 20 Dec 2013 05:38:53 +0000 (21:38 -0800)] 
Style:  Use 'int' not 'char' for status return types.
Fix a const mistake.

11 years agoStyle: Don't check for entry being non-NULL (none
Tim Kientzle [Fri, 20 Dec 2013 05:25:34 +0000 (21:25 -0800)] 
Style:  Don't check for entry being non-NULL (none
of the archive_entry routines do this); adjust
some indentation to match the other code.

11 years agoZip and Rar store file times in local time,
Tim Kientzle [Fri, 20 Dec 2013 05:17:23 +0000 (21:17 -0800)] 
Zip and Rar store file times in local time,
so we can't verify them in tests (since the
time varies depending on the time zone where
the tests are being run).

11 years agoMerge branch 'encryption_detection' of github.com:kwk/libarchive into kwk-encryption_...
Tim Kientzle [Fri, 20 Dec 2013 04:55:10 +0000 (20:55 -0800)] 
Merge branch 'encryption_detection' of github.com:kwk/libarchive into kwk-encryption_detection

Conflicts:
libarchive/archive_read_support_format_zip.c

11 years agoIgnore emacs backup files
Tim Kientzle [Fri, 20 Dec 2013 04:41:59 +0000 (20:41 -0800)] 
Ignore emacs backup files

11 years agoRefactor archive_version_details to eliminate size and printf concerns
Tim Kientzle [Fri, 20 Dec 2013 04:29:14 +0000 (20:29 -0800)] 
Refactor archive_version_details to eliminate size and printf concerns

11 years agoMerge branch 'archive-version-details' of github.com:rosslagerwall/libarchive into...
Tim Kientzle [Fri, 20 Dec 2013 04:19:19 +0000 (20:19 -0800)] 
Merge branch 'archive-version-details' of github.com:rosslagerwall/libarchive into rosslagerwall-archive-version-details

11 years agoMerge branch 'local_coverage' of github.com:kwk/libarchive into kwk-local_coverage
Tim Kientzle [Fri, 20 Dec 2013 04:14:26 +0000 (20:14 -0800)] 
Merge branch 'local_coverage' of github.com:kwk/libarchive into kwk-local_coverage

Conflicts:
CMakeLists.txt

11 years agoRefactor lafe_setprogname slightly to avoid the repeated logic about default handling
Tim Kientzle [Fri, 20 Dec 2013 04:10:46 +0000 (20:10 -0800)] 
Refactor lafe_setprogname slightly to avoid the repeated logic about default handling

11 years agoMerge branch 'master' of github.com:jymigeon/libarchive into jymigeon-master
Tim Kientzle [Fri, 20 Dec 2013 03:58:33 +0000 (19:58 -0800)] 
Merge branch 'master' of github.com:jymigeon/libarchive into jymigeon-master

11 years agoInclude coverage script if ENABLE_COVERAGE is set 44/head
Konrad Kleine [Fri, 13 Dec 2013 08:28:55 +0000 (09:28 +0100)] 
Include coverage script if ENABLE_COVERAGE is set

Rather than including the LibarchiveCodeCoverage.cmake file and checking
there if ENABLE_COVERAGE is set, we only include the file if this option
is set in the first place.

11 years agoMoved local code coverage code separate script
Konrad Kleine [Fri, 13 Dec 2013 08:13:01 +0000 (09:13 +0100)] 
Moved local code coverage code separate script

11 years agoCheckpoint work on zip64 support
Tim Kientzle [Fri, 13 Dec 2013 06:10:06 +0000 (22:10 -0800)] 
Checkpoint work on zip64 support

11 years agoMerge pull request #50 from mcuelenaere/fix-win32-ascii-unicode
Tim Kientzle [Fri, 13 Dec 2013 06:01:32 +0000 (22:01 -0800)] 
Merge pull request #50 from mcuelenaere/fix-win32-ascii-unicode

Use correct variable types for ASCII Windows functions.

11 years agoMerge pull request #52 from seishun/patch-1
Tim Kientzle [Fri, 13 Dec 2013 06:00:31 +0000 (22:00 -0800)] 
Merge pull request #52 from seishun/patch-1

Remove unnecessary windows.h include

11 years agoMerge pull request #48 from kwk/master
Tim Kientzle [Fri, 13 Dec 2013 05:49:25 +0000 (21:49 -0800)] 
Merge pull request #48 from kwk/master

Added all Zip compression names from 6.3.3 format

11 years agoMerge pull request #46 from trel/master
Tim Kientzle [Fri, 13 Dec 2013 05:48:31 +0000 (21:48 -0800)] 
Merge pull request #46 from trel/master

include linux/types.h on CentOS 5 in test/test_sparse_basic.c

11 years agoENH: Allow fine grained control over dependancies
Hans Johnson [Thu, 16 May 2013 16:26:46 +0000 (11:26 -0500)] 
ENH: Allow fine grained control over dependancies

An end user may want to explicitly avoid using
a feature that can be automatically found on the
build system.  This arose when the build machine
had libraries for LZMA but the target machine
did not have those libraries available.

By allowing flags the optional features provided by
LZMA/ZLIB/BZip2/EXPAT/PCREPOSIX/LibGCC
can be explicitly removed (Default behavior is
to use what can be found).

11 years agoFix tar test build with CMake
Tim Kientzle [Fri, 13 Dec 2013 05:22:13 +0000 (21:22 -0800)] 
Fix tar test build with CMake

11 years agoMerge pull request #39 from arsenm/master
Tim Kientzle [Fri, 13 Dec 2013 04:38:05 +0000 (20:38 -0800)] 
Merge pull request #39 from arsenm/master

Fix test builds when building as a sub-project

11 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Fri, 13 Dec 2013 04:24:52 +0000 (20:24 -0800)] 
Merge branch 'master' of github.com:libarchive/libarchive

11 years agotar option mac-ext can now be used to control whether mac extensions are processed...
Tim Kientzle [Fri, 13 Dec 2013 04:24:43 +0000 (20:24 -0800)] 
tar option mac-ext can now be used to control whether mac extensions are processed; defaults to off on non-MacOS

11 years agolibarchive: Use ARCHIVE_LITERAL_ULL to add ULL integer suffix
Brad King [Mon, 9 Dec 2013 19:03:43 +0000 (14:03 -0500)] 
libarchive: Use ARCHIVE_LITERAL_ULL to add ULL integer suffix

The macro maps to an implementation that works on older compilers when
necessary.  Convert the 0ULL literal introduced by commit 6cf33c93
(Issue 320:  Rewrite (again) to avoid the left shift that CLang dislikes
so much, 2013-12-07) to use the macro.

11 years agoFix tabs.
Tim Kientzle [Sat, 7 Dec 2013 22:56:38 +0000 (14:56 -0800)] 
Fix tabs.

11 years agoIssue 320: Rewrite (again) to avoid the left shift that CLang dislikes so much.
Tim Kientzle [Sat, 7 Dec 2013 22:51:26 +0000 (14:51 -0800)] 
Issue 320:  Rewrite (again) to avoid the left shift that CLang dislikes so much.

This version simulates 2s-complement arithmetic on an
unsigned value, then casts it to signed at the end.

11 years agoRemove unused variables
Tim Kientzle [Sun, 1 Dec 2013 23:09:25 +0000 (15:09 -0800)] 
Remove unused variables

11 years agogitignore all emacs backup files
Tim Kientzle [Sun, 1 Dec 2013 23:03:18 +0000 (15:03 -0800)] 
gitignore all emacs backup files

11 years agoRemove deleted test from makefiles
Tim Kientzle [Sun, 1 Dec 2013 22:57:17 +0000 (14:57 -0800)] 
Remove deleted test from makefiles

11 years agoRemove the redundant test.
Tim Kientzle [Sun, 1 Dec 2013 22:54:53 +0000 (14:54 -0800)] 
Remove the redundant test.

11 years agoRefactor Zip writer.
Tim Kientzle [Sun, 1 Dec 2013 22:45:56 +0000 (14:45 -0800)] 
Refactor Zip writer.

Zip writer no longer preserves full archive_entry objects for
every entry; it just accumulates the actual bytes to be put
into the central directory.  Most of the central directory file
header is formatted at the same time as the local file header.
The header formatting is refactored to make it easier to support
variable-length extra data.

The tests are adjusted to match the new output:  We include more
detailed extra data in the central directory, we're more selective
about generating data descriptors (they're not needed for directory
entries, for instance), UT extra data now includes only the time
fields specified by the user, we're setting the "version required"
field more accurately.

There are some initial attempts to include Zip64 extensions
when appropriate; that still needs lots of work.  I'm not
yet sure how to test Zip64 support without generating gigantic
archives.  Hmmm...

11 years agoSupport Zip64 extra data fields for handling large entries.
Tim Kientzle [Tue, 26 Nov 2013 18:03:01 +0000 (10:03 -0800)] 
Support Zip64 extra data fields for handling large entries.

Process extra data fields for central directory and local file headers
so we get correct full size information in both cases.
Correct central directory vs. local file header sanity check
to compare full size information (including data picked out of
the extra data).

Note:  This does not yet support the Zip64 end-of-central-directory
marker so doesn't correctly handle very large archives.

11 years agoAdjust format for longer test names.
Tim Kientzle [Tue, 26 Nov 2013 18:00:10 +0000 (10:00 -0800)] 
Adjust format for longer test names.

11 years agoStart refactoring Zip writer:
Tim Kientzle [Tue, 26 Nov 2013 17:57:03 +0000 (09:57 -0800)] 
Start refactoring Zip writer:
 * Build list of entries for Central directory at entry_finish
   (So we can switch in-memory Central dir to a list of binary blobs.)
 * Rename some variables to clarify the code.
 * Add 'zip64' option to force zip64 extensions for testing

11 years agoIssue 332: Be more careful guessing file mode information from
Tim Kientzle [Sun, 24 Nov 2013 16:44:34 +0000 (08:44 -0800)] 
Issue 332: Be more careful guessing file mode information from
incomplete Zip archives.  In particular, some epub files have
0 in the file type part of the mode field.

11 years agoMerge branch 'master' of github.com:libarchive/libarchive
Tim Kientzle [Sun, 24 Nov 2013 00:02:30 +0000 (16:02 -0800)] 
Merge branch 'master' of github.com:libarchive/libarchive

11 years agoAdd tests to verify that the seeking Zip reader can correctly
Tim Kientzle [Sun, 24 Nov 2013 00:01:11 +0000 (16:01 -0800)] 
Add tests to verify that the seeking Zip reader can correctly
ignore padding at beginning or end.  Fix Issue #257.