Skip Menu |

This queue is for tickets about the Archive-Tar CPAN distribution.

Report information
The Basics
Id: 78030
Status: resolved
Priority: 0/
Queue: Archive-Tar

People
Owner: Nobody in particular
Requestors: XLAT [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.93_02



Subject: Linked entries with relative path issue (at least under Win32)
Date: Mon, 25 Jun 2012 16:11:29 +0200
To: bug-archive-tar [...] rt.cpan.org
From: "Nicolas GEORGES (CPAN)" <xlat [...] cpan.org>
Hi, May I do something wrong in my usage, or this is a real issue releated to documentation under "What do you do with unsupported filetypes in an archive?". I got an error while extracting the openssl-1.0.1c.tar.gz which contain a link for the entry "openssl-1.0.1c/apps/md4.c" to "../crypto/md4/md4.c". Environment: Win XP Pro Perl 5.16.0 Archive::Tar 1.88 Input file: http://www.openssl.org/source/openssl-1.0.1c.tar.gz Symptom: getting the following errors while extracting archive. No such file in archive: '../crypto/md4/md4.c' at -e line 1. Could not find file '../crypto/md4/md4.c' in memory. at -e line 1. Making symbolic link 'C:\Documents and Settings\XLAT\.cpan\build\openssl-1.0.1c\apps\md4.c' to '../crypto/md4/md4.c' failed at -e line 1. Could not extract 'openssl-1.0.1c/apps/md4.c' at -e line 1. I was dumped Archive::Tar::File of this two entries : $VAR1 = bless( { 'uname' => 'openssl', 'mode' => 511, 'size' => 0, 'devminor' => 0, 'devmajor' => 0, 'chksum' => 8321, 'magic' => 'ustar', 'uid' => 0, 'version' => '', 'mtime' => 1336663105, 'name' => 'openssl-1.0.1c/apps/md4.c', 'gname' => 'openssl', 'linkname' => '../crypto/md4/md4.c', 'type' => '2', 'raw' => 'openssl-1.0.1c/apps/md4.c 777 0 0 0 11752756101 20201 2../crypto/md4/md4.c ustar openssl openssl 0 0 ', 'prefix' => '', 'gid' => 0 }, 'Archive::Tar::File' ); $VAR2 = bless( { 'uname' => 'openssl', 'mode' => 436, 'size' => 3987, 'devminor' => 0, 'devmajor' => 0, 'chksum' => 7626, 'magic' => 'ustar', 'uid' => 0, 'version' => '', 'mtime' => 1306935582, 'name' => 'openssl-1.0.1c/crypto/evp/m_md4.c', 'data' => '/* crypto/evp/m_md4.c */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) ... ', 'gname' => 'openssl', 'linkname' => '', 'type' => '0', 'raw' => 'openssl-1.0.1c/crypto/md4/md4.c 664 0 0 10120 7610556270 16255 0 ustar openssl openssl 0 0 ', 'prefix' => '', 'gid' => 0 }, 'Archive::Tar::File' ); Then this is a more verbose output: command: perl -W -MArchive::Tar=1.88 -e "$Archive::Tar::DEBUG++;my $t=Archive::Tar->new;$t->read('openssl-1.0.1c.tar.gz');$t->extract" Long ouptut: Subroutine Cwd::fastcwd redefined at c:/Perl/5.16.0/lib/Cwd.pm line 812. Subroutine Cwd::getcwd redefined at c:/Perl/5.16.0/lib/Cwd.pm line 812. Subroutine Cwd::abs_path redefined at c:/Perl/5.16.0/lib/Cwd.pm line 812. Subroutine Win32::GetCwd redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::SetCwd redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::GetNextAvailDrive redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::GetLastError redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::SetLastError redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::LoginName redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::NodeName redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::DomainName redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::FsType redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::GetOSVersion redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::IsWinNT redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::IsWin95 redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::FormatMessage redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::Spawn redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::GetTickCount redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::GetShortPathName redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::GetFullPathName redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::GetLongPathName redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::CopyFile redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. Subroutine Win32::Sleep redefined at c:/Perl/5.16.0/lib/DynaLoader.pm line 213. No such file in archive: '../crypto/md4/md4.c' at c:/Perl/5.16.0/lib/Archive/Tar.pm line 1038. Archive::Tar::_find_entry('Archive::Tar=HASH(0x390ac)', '../crypto/md4/md4.c') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 958 Archive::Tar::_extract_special_file_as_plain_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)', 'C:\Documents and Settings\XLAT\.cpan\build\openssl-1.0.1c\a...') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 909 Archive::Tar::_make_special_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)', 'C:\Documents and Settings\XLAT\.cpan\build\openssl-1.0.1c\a...') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 866 Archive::Tar::_extract_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 646 Archive::Tar::extract('Archive::Tar=HASH(0x390ac)') called at -e line 1 at -e line 1. Could not find file '../crypto/md4/md4.c' in memory. at c:/Perl/5.16.0/lib/Archive/Tar.pm line 975. Archive::Tar::_extract_special_file_as_plain_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)', 'C:\Documents and Settings\XLAT\.cpan\build\openssl-1.0.1c\a...') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 909 Archive::Tar::_make_special_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)', 'C:\Documents and Settings\XLAT\.cpan\build\openssl-1.0.1c\a...') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 866 Archive::Tar::_extract_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 646 Archive::Tar::extract('Archive::Tar=HASH(0x390ac)') called at -e line 1 at -e line 1. Making symbolic link 'C:\Documents and Settings\XLAT\.cpan\build\openssl-1.0.1c\apps\md4.c' to '../crypto/md4/md4.c' failed at c:/Perl/5.16.0/lib/Archive/Tar.pm line 947. Archive::Tar::_make_special_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)', 'C:\Documents and Settings\XLAT\.cpan\build\openssl-1.0.1c\a...') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 866 Archive::Tar::_extract_file('Archive::Tar=HASH(0x390ac)', 'Archive::Tar::File=HASH(0xf1296c)') called at c:/Perl/5.16.0/lib/Archive/Tar.pm line 646 Archive::Tar::extract('Archive::Tar=HASH(0x390ac)') called at -e line 1 at -e line 1. Could not extract 'openssl-1.0.1c/apps/md4.c' at c:/Perl/5.16.0/lib/Archive/Tar.pm line 647. Archive::Tar::extract('Archive::Tar=HASH(0x390ac)') called at -e line 1 at -e line 1. Thanks, Nicolas.
Subject: Re: [rt.cpan.org #78030] : Linked entries with relative path issue (at least under Win32)
Date: Sat, 7 Jul 2012 16:46:43 +0200
To: bug-Archive-Tar [...] rt.cpan.org
From: "Nicolas GEORGES (CPAN)" <xlat [...] cpan.org>
here is a attempt to fixe that: https://github.com/xlat/archive-tar-new/commit/8b4c5e02d45dbb1c2b764fd593cab2f19792e648 It works now for my case (works in memory) but ptar doesn't.
Hi, I pulled your changes into the main repository and they have now been released as 1.94. Many thanks.