Bug 205324 - 'pax' truncates long file names when extracting an archive
Summary: 'pax' truncates long file names when extracting an archive
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pax
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Radek Brich
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-06 00:58 UTC by starlight
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-07-16 09:26:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
script (428 bytes, text/plain)
2006-09-06 16:18 UTC, starlight
no flags Details
script output (211 bytes, text/plain)
2006-09-06 16:19 UTC, starlight
no flags Details
differences file created by script (19.40 KB, text/plain)
2006-09-06 16:19 UTC, starlight
no flags Details
patch for long names (427 bytes, patch)
2007-07-13 13:59 UTC, Radek Brich
no flags Details | Diff

Description starlight 2006-09-06 00:58:18 UTC
$ rpm -qf /usr/bin/pax
pax-3.0-9

Found this while building 'gcc.4.1.1' from

   ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.1.1/gcc-core-4.1.1.tar.bz2
   ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.1.1/gcc-g++-4.1.1.tar.bz2

Problem doesn't show up till the 'make install' phase.
Had to switch to using 'tar'.  Simply expanding
the above with 'tar' and 'pax' and then comparing the names
with 'find' and 'diff' should demonstrate the differences.

Comment 1 Peter Vrabec 2006-09-06 11:41:45 UTC
Sorry, I can't reproduce it.

bunzip2 gcc-core-4.1.1.tar.bz2
pax -r -f gcc-core-4.1.1.tar

and I got some result with

tar -xvf gcc-core-4.1.1.tar





Comment 2 starlight 2006-09-06 16:18:17 UTC
Created attachment 135664 [details]
script

The problem is in the g++ archive, not in the core archive.
I included both for since that's what one does when building
GCC.

Here is a canned script that reproduces the problem along
with the output.

Comment 3 starlight 2006-09-06 16:19:01 UTC
Created attachment 135665 [details]
script output

Comment 4 starlight 2006-09-06 16:19:32 UTC
Created attachment 135666 [details]
differences file created by script

Comment 5 starlight 2006-09-06 16:24:57 UTC
And now that I look, I see the magic number is 100 characters.
Any longer pathnames get chopped.


Comment 6 starlight 2006-09-08 01:40:14 UTC
Further info:

Apparently the 100 character limit is specified in the
POSIX standard for 'pax'.  At a minimum, I see it as a bug
that 'pax' truncates to 100 characters silently, without
giving any warning.  In addition, I don't see the "value add"
in slavishly conforming with the POSIX spec at the expense of
compatibility with 'tar'.  What does one gain by chopping
the path names?  Nothing but trouble.

Comment 7 Lukas Vrabel 2007-03-28 13:14:51 UTC
It may be changed in fedora core, but unfortunately not in RHEL

Comment 8 Radek Brich 2007-07-13 13:59:23 UTC
Created attachment 159180 [details]
patch for long names

Filenames in that archive are saved using some sort of GNU hack (the archive is
non-standard ustar). They are read correctly by pax but additionaly truncated
to 100 characters and then written to disk. I thing this is total nonsense so
I'll apply it to rawhide soon.

Comment 9 Radek Brich 2007-07-16 09:26:01 UTC
pax-3.4-3.fc8


Note You need to log in before you can comment on or make changes to this bug.