bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] tar 1.15.1 fails creating multivol tape archive, outputs i


From: Sergey Poznyakoff
Subject: Re: [Bug-tar] tar 1.15.1 fails creating multivol tape archive, outputs incorrect error
Date: Wed, 06 Apr 2005 13:39:12 +0300

Jim Faulkner <address@hidden> wrote:

> tar archive.  However, I also know that this error message is incorrect
> even for version 1.15.1, because earlier in the above backup (probably
> around tape volume #1 or #2), tar 1.15.1 had no complaints while backing
> up this file:
> c64/traunstaas_C64_dats/Commodore64 E-M (Corinthian 0.3)/Mystery Of The Nile, 
> The (MadeInSpain&SoftwareCreations&Firebird)(19xx)(triad).zip

The GNU multivolume format imposes a 100-character restriction on the length
of the file that straddles the volume boundary, i.e. the one that does
not fit entirely into the current volume. No restrictions are imposed on
other files, so the same file with a long username can be archived if it
happens to be in the middle of a volume and will produce an error
message if the volume capacity is exceeded while the file is being
archived.

> To be sure that this was a problem with tar 1.15.1, I downgraded to tar
> 1.13.92 and did the backup... it worked fine:

Earlier versions of tar did not check the length of the file name while
writing volume header, allowing long filenames to overwrite other data
from the header. Depending on the circumstances, this lead to various
problems (http://lists.gnu.org/archive/html/bug-tar/2004-08/msg00012.html).

> This bug is a showstopper for me, so I'm willing to wear out a few tapes
> testing possible solutions to this problem.

Please try the attached patch. While still producing a warning message
it will store a truncated filename in the multivolume header, which
should be safe in most circumstances.

To apply the patch, change to tar-1.15.1 directory and run

   patch -p0 < patchfile

Please inform me if it works for you.

Regards,
Sergey

Index: src/buffer.c
===================================================================
RCS file: /cvsroot/tar/tar/src/buffer.c,v
retrieving revision 1.81
diff -p -u -r1.81 buffer.c
--- src/buffer.c        4 Apr 2005 18:21:55 -0000       1.81
+++ src/buffer.c        6 Apr 2005 10:34:26 -0000
@@ -653,8 +653,8 @@ flush_write (void)
        record_start++;
 
       if (strlen (real_s_name) > NAME_FIELD_SIZE)
-       FATAL_ERROR ((0, 0,
-                     _("%s: file name too long to be stored in a GNU 
multivolume header"),
+       WARN ((0, 0,
+             _("%s: file name too long to be stored in a GNU multivolume 
header, truncated"),
                      quotearg_colon (real_s_name)));
 
       memset (record_start, 0, BLOCKSIZE);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]