This is the mail archive of the
mailing list for the Cygwin project.
Re: CMake 2.4.7-1 ready
Brian Dessent wrote:
No, nothing's changed in the untar code in forever. I debugged it and
the problem is that setup does not recognise the file as a valid tar
archive. What version of tar did you use to create it?
The problem is the 'magic' field of the tar header (offset 257). Setup
expects this to contain "ustar" followed by two spaces and a trailing
62 if (original->peek (magic, longest_magic) > 0)
64 if (memcmp (&magic, "ustar\040\040\0", 8) == 0)
66 /* tar */
67 archive_tar *rv = new archive_tar (original);
68 if (!rv->error ())
69 return rv;
70 return NULL;
OK, I looked at the libtar code and found this:
if (t->options & TAR_GNU)
strncpy(t->th_buf.magic, "ustar ", 8);
strncpy(t->th_buf.version, TVERSION, TVERSLEN);
strncpy(t->th_buf.magic, TMAGIC, TMAGLEN);
#define TMAGIC "ustar" /* ustar and a null */
#define TMAGLEN 6
#define TVERSION "00" /* 00 and no null */
#define TVERSLEN 2
So, that explains why the tar file works, it is just not a gnu tar file.
Something must have changed in my code because the 2.4.6 version
has the gnu style header and the 2.4.7 version has the other header.
I will try and figure out what changed and create a new release.