Skip to content

ZipArchiver creates archives with inconsistent central directory entries #57

Closed
@jsievers

Description

@jsievers

this is a followup on Tycho bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=516432

ZipArchiver creates zips about which Info-ZIP complains with warnings for every file entry:

copying: one.txt
zip warning: Local Version Needed To Extract does not match CD: one.txt

Steps to reproduce:

  1. run the plexus-archiver unit tests.
  2. go to plexus-archiver/target/output
  3. zip -F --out fixed.zip archive1.zip

(or any other zip archive created by ZipArchiverTest)

Interestingly, if you uncomment the @ignore s in ConcurrentJarCreatorTest (and do the manual setup by copying some sample files to ${user.home}/lsrc/plexus/

the zip files created by this test (${user.home}/multiStream2-parallel.zip ) are validated just fine by Info-ZIP

That means ConcurrentJarCreator is doing it right while ZipArchiver is producing the warnings about the central directory entries.

We narrowed this bug down to be introduced between plexus-archiver 2.9.1 and 2.10-beta-1

We think it was introduced with commit
f1cb37a

which first introduced concurrent zip/jar file creation.

I am using info-zip on MacOS Sierra but the problem was reported originally on Linux.

$ zip --version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.

Compiled with gcc 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34) for Unix (Mac OS X) on Oct 14 2016.

Zip special compilation options:
USE_EF_UT_TIME (store Universal Time)
SYMLINK_SUPPORT (symbolic links supported)
LARGE_FILE_SUPPORT (can read and write large files on file system)
ZIP64_SUPPORT (use Zip64 to store large files in archives)
STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
UIDGID_16BIT (old Unix 16-bit UID/GID extra field also used)
[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions