[gnu.utils.bug] GNU tar: Problems with filenames of more than 14 chars

peter@orfeo.radig.de (Peter Radig) (02/05/90)

Although I know that it is not the primary duty of GNU program authors
to make their programs run on Unix Sys V, I would like to discuss one
problem:

Recently, I got the uunet-tapes and tried to load the TeX sources from
one tape with GNU tar. But the filenames of the sources on this tape
only differ in their last two chars (i.e. char 16 and 17). Since Sys V
allows only filenames with 14 chars, I had no other choice than to load
one file, rename it, load the next file, etc.

Did anyone solve this problem in a quite better manner than I did?
(I think of a extension to GNU tar that allows to remap long filenames
automagically, e.g.

	very_long_filename.1		---> AAfilename.1
	very_long_filename.2		---> AAfilename.2
	another_dirty_filename.aa	---> ABilename.aa
	third_filename_so_looooong	---> ACo_looooong

- Maybe there is another proposal for solving this problem?)

Any hints???

Peter

-- 
Peter Radig
Voice: +49 69 746972
USENET: peter@radig.de  or:  uunet!unido!radig!peter

djm@eng.umd.edu (David J. MacKenzie) (02/06/90)

> Recently, I got the uunet-tapes and tried to load the TeX sources from
> one tape with GNU tar. But the filenames of the sources on this tape
> only differ in their last two chars (i.e. char 16 and 17). Since Sys V
> allows only filenames with 14 chars, I had no other choice than to load
> one file, rename it, load the next file, etc.

An option to resolve name clashes (like Kermit's) might be useful even
to BSD users.  If it is about to extract a file that already exists,
it changes the name of the file it is about to create so that it is
similar, but unique.
--
David J. MacKenzie <djm@eng.umd.edu> <djm@ai.mit.edu>

plocher@sally.Sun.COM (John Plocher) (02/07/90)

+-- In <1990Feb5.153048.1824@orfeo.radig.de> peter@radig.de (Peter Radig) writes
| allows only filenames with 14 chars, I had no other choice than to load
| one file, rename it, load the next file, etc.
+--

There was a very nice routine posted to sources.misc about a year ago that
used some good heuristics to convert a name from BSD (long) style to SYSV
(14 char) style.  It elided vowels, shortened multi-part names (foo.bar.baz.a.1
became foo.br.bz.a1 or some such) ...

I reworked the program into a callable function that could be given an
argument to permute the heuristics (in case 2 long names "hashed" into
the same short name) and inserted it into the
tar source (AT&T, not Gnu :-) so that it worked on pathname segments
so I could extract X11R3 source onto a Microport Vr3 machine :-)  The
mods were very simple (there is one place where a filename is extracted
from the archive and the function can be applied there...)

Now that I no longer need to use 386's with System V I no longer have that
code so I can't pass it on, but as I said, it wasn't hard...

In all, since the System V filesystem is being carried on into the Vr4 world,
adding this functionality makes lots of sense.  

  -John Plocher