Bug 1184194
Summary: | perl-Archive-Tar-1.58-138.el6 breaks content on unpacking tar archives with PAX headers | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Mike B. <michiel.beijen> | ||||||
Component: | perl | Assignee: | perl-maint-list | ||||||
Status: | CLOSED ERRATA | QA Contact: | Martin Kyral <mkyral> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 6.7 | CC: | dkutalek, jorton, mkyral, ppisar, psabata | ||||||
Target Milestone: | rc | Keywords: | Patch | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | perl-5.10.1-139.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Prior to this update, the Archive::Tar Perl module unpacked PAX headers into artificial PaxHeader subdirectories, which caused the extracted tree to be different from the archived tree. Consequently, installation of a Comprehensive Perl Archive Network (CPAN) distribution by the cpan client failed. This bug has been fixed, and it is now possible to install CPAN distributions archived with extended attributes.
|
Story Points: | --- | ||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2015-07-22 05:59:48 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Mike B.
2015-01-20 19:05:01 UTC
tar-1.23-11.el6.x86_64 skips extended headers properly: $ cpan P/PH/PHRED/SOAP-Lite-1.13.tar.gz Going to read '/home/test/.cpan/sources/authors/01mailrc.txt.gz' CPAN: Compress::Zlib loaded ok (v2.021) ............................................................................DONE Going to read '/home/test/.cpan/sources/modules/02packages.details.txt.gz' Database was generated on Wed, 21 Jan 2015 02:53:21 GMT CPAN: HTTP::Date loaded ok (v5.831) .............. New CPAN.pm version (v2.05) available. [Currently running version is v1.9402] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. CPAN: Time::HiRes loaded ok (v1.9721) ..............................................................DONE Going to read '/home/test/.cpan/sources/modules/03modlist.data.gz' DONE CPAN: Storable loaded ok (v2.20) Going to write /home/test/.cpan/Metadata CPAN: Data::Dumper loaded ok (v2.124) 'YAML' not installed, falling back to Data::Dumper and Storable to read prefs '/home/test/.cpan/prefs' Running make for P/PH/PHRED/SOAP-Lite-1.13.tar.gz CPAN: Digest::SHA loaded ok (v5.47) Checksum for /home/test/.cpan/sources/authors/id/P/PH/PHRED/SOAP-Lite-1.13.tar.gz ok /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev' /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino' /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink' SOAP-Lite-1.13/ [...] /bin/tar: Ignoring unknown extended header keyword `SCHILY.dev' /bin/tar: Ignoring unknown extended header keyword `SCHILY.ino' /bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink' SOAP-Lite-1.13/bin/stubmaker.pl CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build P/PH/PHRED/SOAP-Lite-1.13.tar.gz Checking if your kit is complete... Looks good Warning: prerequisite IO::SessionData 1.03 not found. Writing Makefile for SOAP::Lite [...] If you install the "tar" package and set cpan client to prefer it: $ grep "'tar'" .cpan/CPAN/MyConfig.pm 'tar' => q[/bin/tar], or if you uninstall the perl-Archive-Tar package, it will work. The issue is that Archive::Tar dumps PAX headers into PaxHeader subdirectories like: $ perl -MArchive::Tar -e 'my $a=Archive::Tar->new; $a->read(q{/home/test/.cpan/sources/authors/id/P/PH/PHRED/SOAP-Lite-1.13.tar.gz}); $a->extract or die $a->error;' $ find -name 'Makefile.PL' ./SOAP-Lite-1.13/Makefile.PL ./SOAP-Lite-1.13/PaxHeader/Makefile.PL and ExtUtils::MakeMaker used in ./SOAP-Lite-1.13/Makefile.PL executes all Makefile.PLs recursively, thus also ./SOAP-Lite-1.13/PaxHeader/Makefile.PL which is not Perl code. So basically, the Archive::Tar should not create the PaxHeader directories because it make the extracted tree different from the archived one. Created attachment 982223 [details]
Upstream patch
Created attachment 982241 [details]
Upstream fix ported to perl-5.10.1
Hi Petr, (In reply to Petr Pisar from comment #2) > tar-1.23-11.el6.x86_64 skips extended headers properly: Yes: it warns about them, but does skip them. But even though tar is set as you described in the cpan client, it uses Archive::Tar to untar, causing problems. cpan[1]> o conf tar tar [/bin/tar] If I read your update correctly, you're backporting the Archive::Tar patch to skip the extended headers into the perl-5.10.1 package? That's awesome! (In reply to Mike B. from comment #6) > But even though tar is set as you described in the cpan client, it uses > Archive::Tar to untar Unfortunately yes. The cpan client does not honour prefer_external_tar configuration option yet and it uses Archive::Tar if it's available and the archive is gzipped (in contrast to bzipped ones). So the only workaround is to uninstall perl-Archive-Tar now. How to test: (1) Obtain an tar archive with extended attributes transported in PAX headers. (You can download <http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/SOAP-Lite-1.13.tar.gz>.) (2) Unpack the archive by Archive::Tar Perl module: $ perl -MArchive::Tar -e 'my $a=Archive::Tar->new; $a->read(q{foo.tar.gz}); $a->extract or die $a->error;' (3) Check for PaxHeader directories. Before: For each packaged file with extended attributes, there is a PaxHeader directory in the same directory as the file and a file with the same name in thePaxHeader directory. After: There are no PaxHeader directories. Alternatively, unpack the archive with tar(1) tool and compare the unpacked trees recursively. Before: They differ. After: There is not difference. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1266.html |