Closed dag-erling closed 5 years ago
Thank you for reporting this!
I'm not able to reproduce the errors you are experiencing. The .tar.gz files were created with GNU tar (tar czvf ....tar.gz ...
), please use GNU tar to extract them to avoid errors.
$ wget -qO sam2p-0.49.4.tar.gz https://github.com/pts/sam2p/releases/download/v0.49.4/sam2p-0.49.4.tar.gz
$ sha256sum sam2p-0.49.4.tar.gz
d23707b2405ca94e2a237cb81f62fb5916f5e4360cf9a705061479c8fa1dff5c sam2p-0.49.4.tar.gz
$ tar tzf sam2p-0.49.4.tar.gz
(empty output)
$ tar xzf sam2p-0.49.4.tar.gz
(empty output)
$ tar tzvf sam2p-0.49.4.tar.gz | grep vcsam2p.ico
-rw-r----- pts/eng 1078 2013-12-11 17:52 sam2p-0.49.4/vcsam2p.ico
hrw-r----- pts/eng 0 2013-12-11 17:52 sam2p-0.49.4/vcsam2p.ico link to sam2p-0.49.4/vcsam2p.ico
$ tar --version
tar (GNU tar) 1.30
(...)
Extraction also works for me with earlier versions of GNU tar (1.29 and earlier) and also with busybox tar
, BusyBox v1.21.1.
What else should sam2p change to make it easier to extract archives?
I'm not able to reproduce the errors you are experiencing.
And yet your tar tzvf
output confirms the presence of a link which shouldn't be there. You should only get a single line for each file. The fact that GNU tar doesn't complain when extracting it doesn't mean it's correct.
I tried to run make dist
myself in an attempt to figure out why this happens, but ran into other issues, such as trying to create a tarball without specifying a filename. If you want to output the tarball to standard output, use -cf-
. The normal behavior of tar when no filename is specified is to attempt to write to a tape drive (either $TAPE
or a hardcoded default, probably /dev/sr0
on Linux). This is clearly stated in the documentation.
What else should sam2p change to make it easier to extract archives?
Ideally, switch to 100% autotools and use make dist
to generate tarballs, instead of a highly idiosyncratic process of your own design.
Thank you for the feedback and the insights!
I've filed separate issue https://github.com/pts/sam2p/issues/48 about the vcsam2p.ico symlink.
switch to 100% autotools and use make dist to generate tarballs
Thank you for the recommendation! This is not going to happen soon, because I don't want sam2p to depend on autotools (except for autoconf). For me software maintenance and compilation has been harder, more confusing and slower with autotools than without it.
I'm closing this issue now. I'll reopen it as soon as I get more input and I'm able to reproduce the extraction errors either with GNU tar or busybox tar
.
I found the bug. Each of these files is listed twice in files
:
% sort files | uniq -cd
2 in_jai.cpp
2 in_pnm.cpp
2 in_tga.cpp
2 in_xpm.cpp
2 out_gif.cpp
2 pts_defl.c
2 pts_defl.h
2 sam2p_main.cpp
2 vcsam2p.ico
The source tarball for 0.49.4 contains conflicting entries and self-referential links:
The tarball for 0.49.3 also contains multiple entries for some files, but with the same type, so they are silently overwritten:
Could you please re-roll it?