hello,
i was running 'make test' on v1.5.3.1-109-gacd6917 and i hit the
following issue:
* ok 6: validate file modification time
* ok 7: git get-tar-commit-id
* ok 8: extract tar archive
* ok 9: validate filenames
* ok 10: validate file contents
* ok 11: git tar-tree with prefix
* ok 12: extract tar archive with prefix
* ok 13: validate filenames with prefix
* ok 14: validate file contents with prefix
* ok 15: create an archive with a substfile
* ok 16: extract substfile
* ok 17: validate substfile contents
* ok 18: git archive --format=zip
* ok 19: extract ZIP archive
* ok 20: validate filenames
* FAIL 21: validate file contents
diff -r a d/a
* ok 22: git archive --format=zip with prefix
* ok 23: extract ZIP archive with prefix
* ok 24: validate filenames with prefix
* FAIL 25: validate file contents with prefix
diff -r a e/prefix/a
* ok 26: git archive --list outside of a git repo
* failed 2 among 26 test(s)
make[1]: *** [t5000-tar-tree.sh] Error 1
make[1]: Leaving directory `/home/vmiklos/git/git/t'
make: *** [test] Error 2
$ tar --version
tar (GNU tar) 1.18
$ diff --version
diff (GNU diffutils) 2.8.1
maybe these versions are too new or old? if i missed any needed info,
please let me know.
thanks,
- VMiklos
From: Pierre Habouzit <hidden> Date: 2016-06-15 22:43:35
On Mon, Sep 17, 2007 at 09:17:42PM +0000, Miklos Vajna wrote:
hello,
i was running 'make test' on v1.5.3.1-109-gacd6917 and i hit the
following issue:
[...]
* FAIL 21: validate file contents
diff -r a d/a
* ok 22: git archive --format=zip with prefix
* ok 23: extract ZIP archive with prefix
* ok 24: validate filenames with prefix
* FAIL 25: validate file contents with prefix
diff -r a e/prefix/a
* ok 26: git archive --list outside of a git repo
* failed 2 among 26 test(s)
make[1]: *** [t5000-tar-tree.sh] Error 1
make[1]: Leaving directory `/home/vmiklos/git/git/t'
make: *** [test] Error 2
Well, it works for me:
$ git describe && git st
v1.5.3.1-109-gacd6917
# Not currently on any branch.
nothing to commit (working directory clean)
$ cd t && ./t5000-tar-tree.sh
* ok 1: populate workdir
* ok 2: add files to repository
* ok 3: git archive
* ok 4: git tar-tree
* ok 5: git archive vs. git tar-tree
* ok 6: validate file modification time
* ok 7: git get-tar-commit-id
* ok 8: extract tar archive
* ok 9: validate filenames
* ok 10: validate file contents
* ok 11: git tar-tree with prefix
* ok 12: extract tar archive with prefix
* ok 13: validate filenames with prefix
* ok 14: validate file contents with prefix
* ok 15: create an archive with a substfile
* ok 16: extract substfile
* ok 17: validate substfile contents
* ok 18: git archive --format=zip
* ok 19: extract ZIP archive
* ok 20: validate filenames
* ok 21: validate file contents
* ok 22: git archive --format=zip with prefix
* ok 23: extract ZIP archive with prefix
* ok 24: validate filenames with prefix
* ok 25: validate file contents with prefix
* ok 26: git archive --list outside of a git repo
* passed all 26 test(s)
--
·O· Pierre Habouzit
··O madcoder@debian.org
OOO http://www.madism.org
From: René Scharfe <hidden> Date: 2016-06-15 22:43:35
Miklos Vajna schrieb:
* ok 18: git archive --format=zip
* ok 19: extract ZIP archive
* ok 20: validate filenames
* FAIL 21: validate file contents
diff -r a d/a
* ok 22: git archive --format=zip with prefix
* ok 23: extract ZIP archive with prefix
* ok 24: validate filenames with prefix
* FAIL 25: validate file contents with prefix
diff -r a e/prefix/a
* ok 26: git archive --list outside of a git repo
* failed 2 among 26 test(s)
make[1]: *** [t5000-tar-tree.sh] Error 1
make[1]: Leaving directory `/home/vmiklos/git/git/t'
make: *** [test] Error 2
$ tar --version
tar (GNU tar) 1.18
$ diff --version
diff (GNU diffutils) 2.8.1
maybe these versions are too new or old? if i missed any needed info,
please let me know.
The failing tests check ZIP file creation, not tar file creation.
Perhaps your unzip command works a bit differently from Info-ZIP's?
Also, what is the difference between t/trash/a and t/trash/d/a after
running the test script (that's what test 21 is comparing)?
René
On Mon, Sep 17, 2007 at 11:50:32PM +0200, René Scharfe [off-list ref] wrote:
The failing tests check ZIP file creation, not tar file creation.
Perhaps your unzip command works a bit differently from Info-ZIP's?
$ zip -v
Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 2.32 (June 19th 2006), by Info-ZIP.
should this version be ok?
Also, what is the difference between t/trash/a and t/trash/d/a after
running the test script (that's what test 21 is comparing)?
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:43:35
Hi,
On Tue, 18 Sep 2007, Miklos Vajna wrote:
quoted hunk
On Mon, Sep 17, 2007 at 11:50:32PM +0200, Ren? Scharfe [off-list ref] wrote:
quoted
The failing tests check ZIP file creation, not tar file creation.
Perhaps your unzip command works a bit differently from Info-ZIP's?
$ zip -v
Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 2.32 (June 19th 2006), by Info-ZIP.
should this version be ok?
quoted
Also, what is the difference between t/trash/a and t/trash/d/a after
running the test script (that's what test 21 is comparing)?
Ah, that's my friend GNU diff again... Try running the test with "-i -v",
and it will pass, if I am right.
I actually made a patch for GNU diff back when this hit me, only to find
out that it was fixed in CVS. Apparently, for a short period, during
which 2.8.1 was released, there was a bug that prevented GNU diff from
working properly when the output was redirected to a non-tty.
If I'm right, and it is that bug, it might be worthwhile to convert the
calls to "diff -u" in that test script with calls to "git diff" (possibly
with --no-index).
Ciao,
Dscho
From: René Scharfe <hidden> Date: 2016-06-15 22:43:35
Miklos Vajna schrieb:
On Mon, Sep 17, 2007 at 11:50:32PM +0200, René Scharfe [off-list ref] wrote:
quoted
The failing tests check ZIP file creation, not tar file creation.
Perhaps your unzip command works a bit differently from Info-ZIP's?
$ zip -v
Copyright (c) 1990-2006 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 2.32 (June 19th 2006), by Info-ZIP.
should this version be ok?
Info-ZIP zip and unzip are two different programs, each with their
own version numbers.
quoted hunk
quoted
Also, what is the difference between t/trash/a and t/trash/d/a after
running the test script (that's what test 21 is comparing)?
Ah! l1 is a symlink to a. The target of a symlink is stored as file
content in a ZIP archive and marked with a special flag. An unzipper
that doesn't understand this flag would create a file containing the
link target's name instead of a symlink pointing to the target.
The unzip on my system says:
$ unzip -v
UnZip 5.52 of 28 February 2005, by Ubuntu. Original by Info-ZIP.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.1.2 (Ubuntu 4.1.2-0ubuntu4) for Unix (Linux ELF) on Mar 31 2007.
UnZip special compilation options:
ACORN_FTYPE_NFS
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
TIMESTAMP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.9 of 05 May 2000]
I suspect you need SET_DIR_ATTRIB in order to extract symlinks.
René
Ah! l1 is a symlink to a. The target of a symlink is stored as file
content in a ZIP archive and marked with a special flag. An unzipper
that doesn't understand this flag would create a file containing the
link target's name instead of a symlink pointing to the target.
The unzip on my system says:
$ unzip -v
UnZip 5.52 of 28 February 2005, by Ubuntu. Original by Info-ZIP.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.1.2 (Ubuntu 4.1.2-0ubuntu4) for Unix (Linux ELF) on Mar 31 2007.
UnZip special compilation options:
ACORN_FTYPE_NFS
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
TIMESTAMP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
VMS_TEXT_CONV
WILD_STOP_AT_DIR
[decryption, version 2.9 of 05 May 2000]
I suspect you need SET_DIR_ATTRIB in order to extract symlinks.
$ unzip -v
UnZip 5.52 of 28 February 2005, by Info-ZIP. Maintained by C. Spieler.
Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for
details.
Latest sources and executables are at
ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.1.2 for Unix (Linux ELF) on May 9 2007.
UnZip special compilation options:
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
TIMESTAMP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
VMS_TEXT_CONV
[decryption, version 2.9 of 05 May 2000]
if i'm not wrong then these options should be ok. :S
thanks,
- VMiklos
From: René Scharfe <hidden> Date: 2016-06-15 22:43:35
Miklos Vajna schrieb:
$ unzip -v
UnZip 5.52 of 28 February 2005, by Info-ZIP. Maintained by C. Spieler.
Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for
details.
Latest sources and executables are at
ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.
Compiled with gcc 4.1.2 for Unix (Linux ELF) on May 9 2007.
UnZip special compilation options:
ASM_CRC
COPYRIGHT_CLEAN (PKZIP 0.9x unreducing method not supported)
SET_DIR_ATTRIB
TIMESTAMP
USE_EF_UT_TIME
USE_UNSHRINK (PKZIP/Zip 1.x unshrinking method supported)
USE_DEFLATE64 (PKZIP 4.x Deflate64(tm) supported)
VMS_TEXT_CONV
[decryption, version 2.9 of 05 May 2000]
if i'm not wrong then these options should be ok. :S
Well, looks OK to me at least. The Debian package (and thus Ubuntu's
too) has a symlink related fix, from Christian Spieler, no less:
http://packages.debian.org/changelogs/pool/main/u/unzip/unzip_5.52-9/changeloghttp://ftp.de.debian.org/debian/pool/main/u/unzip/unzip_5.52-9.diff.gz
Perhaps this is missing from your version?
Let's check if the ZIP file on our machines match. In order for
this to succeed we need to first take out any randomness. Please
apply the patch at the end of the mail, which sets GIT_AUTHOR_DATE
to a fixed value instead of using the current time, run the test
and then this:
$ md5sum t/trash/d.zip # run just after t5000-tar-tree.sh
35f6183b7816960cadfc6cac74530640 t/trash/d.zip
The test passes just fine here, so if the checksums match then your
unzip is most likely to blame. In this case you can work around
your problem by commenting out the "ln -s" in t5000-tar-tree.sh.
René
--- snip! ---
archive: make test repeatable
Set GIT_AUTHOR_DATE to a fixed value, just like it's already done
for GIT_COMMITTER_DATE. This makes the test repeatable, and
resulting archive files can by compared on mailing lists simply by
comparing their checksums.
Signed-off-by: Rene Scharfe <redacted>