-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExtUtils::MakeMaker calls by default /bin/tar which creates problematic PAX archives #349
Comments
Perhaps Archive::Tar’s Or ExtUtils::MakeMaker could remove |
Sounds reasonable regardless of what we do with MakeMaker. https://github.com/jib/archive-tar-new
That would require detecting exactly what tar we're working with here, and only add it for tars where it's needed/supported. |
I don’t think it would – we’d know we’d be working with |
It's been accepted. |
ExtUtils::MakeMaker uses by default system /bin/tar binary for creating distribution archives when invoking
make dist
. On more systems /bin/tar binary by default creates PAX archives instead of classic TAR archives. When you try to unpack PAX archive by a program which understands only ustar (and not pax), it creates PaxHeader subdirectory and in this subdirectory creates random files and their content has raw PAX extended attributes. So it is common that such tar program creates PaxHeader/Makefile.PL with some random garbage. It is not valid Perl code and existing it fails. So on such systems it is not possible to install perl distributions from PAX archives. There are more bug reports about this issue, e.g.:Dual-Life/Devel-PPPort#183
https://huntingbears.nl/2015/02/17/new-tar-paxheaders-and-installing-from-cpan/
http://www.perlmonks.org/?node_id=1004571
So correct way to generate a new distribution is to use ustar archive and not PAX archive.
Perl since 5.10 has in Core module Archive::Tar and
ptar
binary which creates TAR archives, not PAX. So ExtUtils::MakeMaker could switch from /bin/tar to ptar by default to fix this problem and prevent creating of PAX archives on systems which /bin/tar binary by default creates PAX and not ustar. IIRC new versions of GNU tar already switched default to PAX, so Perl coreptar
looks like a solution for this problem.There is already proposed change to use
--format=ustar
flag for /bin/tar, but in discussion was a point that this option works correctly only for GNU tar implementation. For BSD tar implementation it in some cases creates empty tar archives... See discussion: xsawyerx/module-starter#73The text was updated successfully, but these errors were encountered: