On Mon, Mar 10, 2003 at 11:08:57AM +0100, Luc Santeramo
wrote:> Hi,
>
> I've got a File name too long problem using rsync-2.5.6 or rsync
2.5.5-0.1
> (debian)
>
> I had a look to the mailing list archive and to the todo file and all
I've
> seen was that the problem only appears on old special systems.
> I'm using debian 2.2.20. (is it too old?)
No it isn't too old. What the person was probably referring
to was old filesystems that limited filename size to 8.3 or
to 14 characters.
What you have done is hit a file created by something insane
where the filename is 252 characters long. Adding the
prepended . and the appended .XXXXXX made it 260 characters
long and the filesystem doesn't support that long a name.
I have a recollection of someone suggesting a patch to
so our use of mkstemp didn't increase the length of long
filenames but i don't recall anything coming of that.
The easiest solution would be for the file creator to stop
making such long file names. If you cannot do that i have
attached a patch against CVS with a quick hack that avoids
the problem as long as you don't use --temp-dir.
>
> I've already posted this bug in debian bug tracking system
> (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=183667)
> but maybe I have to do it here as well...
It isn't really a debian problem although maybe one of their
developers would create a better fix than i just did.
The real culprit would seem to be quarilis. I assume that
is the product that created the cache files.
>
>
> Package: rsync
> Version: 2.5.5-0.1
> Severity: important
>
> I'm using rsync to copy from /dev/hda to /dev/hdb
>
> I use options below :
> --verbose --recursive --links --hard-links --perms --owner --group
> --devices --times --no-whole-file --delete --one-file-system
>
> and here is what rsync log says just before stopping:
>
>
data/quarilis/cache/cache2/190/www.enc.sorbonne.fr/estampes/interrogation.php?sujet=ornementation,%20all%E9gorie,%20ange,%20aveugle,%20balance,%20couronne,%20%E9p%E9e,%20Justice,%20laurier,%20livre,%20nu%E9e,%20pape,%20Saint%20Paul,%20Saint%20Pierre,%20profession%20judiciaire,%20sciences%20juridiques,%20soldat
>
data/quarilis/cache/cache2/190/www.enc.sorbonne.fr/estampes/interrogation.php?sujet=ornementation,%20all%E9gorie,%20armement,%20captif,%20Ph%E9bus,%20plan,%20renomm%E9e,%20t%EAte%20;%20sc%E8ne%20historique,%20arm%E9e,%20bataille,%20cadavre,%20Cassel,%20cavalerie,%20moulin%20%E0%20vent,%20mousquet,%20paysage
>
data/quarilis/cache/cache2/190/www.enc.sorbonne.fr/estampes/interrogation.php?sujet=sc%E8ne%20historique,%20arm%E9e,%20armement,%20carrosse,%20cartouche,%20casque,%20cavalier,%20cheval,%20cuirasse,%20Dole,%20Louis%20XIV,%20ornementation,%20paysage,%20plan,%20pont,%20reverence,%20rivi%E8re,%20roi,%20soldat,%20ville
> mkstemp
>
data/quarilis/cache/cache2/190/www.enc.sorbonne.fr/estampes/.interrogation.php?sujet=ornementation,%20all%E9gorie,%20ange,%20aveugle,%20balance,%20couronne,%20%E9p%E9e,%20Justice,%20laurier,%20livre,%20nu%E9e,%20pape,%20Saint%20Paul,%20Saint%20Pierre,%20profession%20judiciaire,%20sciences%20juridiques,%20soldat.4VvZva
> failed: File name too long
> mkstemp
>
data/quarilis/cache/cache2/190/www.enc.sorbonne.fr/estampes/.interrogation.php?sujet=ornementation,%20all%E9gorie,%20armement,%20captif,%20Ph%E9bus,%20plan,%20renomm%E9e,%20t%EAte%20;%20sc%E8ne%20historique,%20arm%E9e,%20bataille,%20cadavre,%20Cassel,%20cavalerie,%20moulin%20%E0%20vent,%20mousquet,%20paysage.RM7Xfk
> failed: File name too long
> mkstemp
>
data/quarilis/cache/cache2/190/www.enc.sorbonne.fr/estampes/.interrogation.php?sujet=sc%E8ne%20historique,%20arm%E9e,%20armement,%20carrosse,%20cartouche,%20casque,%20cavalier,%20cheval,%20cuirasse,%20Dole,%20Louis%20XIV,%20ornementation,%20paysage,%20plan,%20pont,%20reverence,%20rivi%E8re,%20roi,%20soldat,%20ville.iCYLVt
> failed: File name too long
> wrote 4027188 bytes read 120814 bytes 39317.55 bytes/sec
> total size is 29700497583 speedup is 7160.19
> rsync error: partial transfer (code 23) at main.c(578)
>
>
> -- System Information
> Debian Release: 3.0
> Architecture: i386
> Kernel: Linux r3 2.2.20-compact #1 Sat Apr 20 12:40:22 EST 2002 i686
> Locale: LANG=C, LC_CTYPE=C
>
> Versions of packages rsync depends on:
> ii libc6 2.2.5-11.2 GNU C Library: Shared
> libraries an
> ii libpopt0 1.6.2-7 lib for parsing cmdline
> parameters
>
>
> hope this helps.
>
> thanks
>
> Luc
>
> --
> To unsubscribe or change options:
> http://lists.samba.org/mailman/listinfo/rsync
> Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw@pegasys.ws
Remember Cernan and Schmitt
-------------- next part --------------
Index: receiver.c
==================================================================RCS file:
/cvsroot/rsync/receiver.c,v
retrieving revision 1.41
diff -u -b -r1.41 receiver.c
--- receiver.c 20 Jan 2003 23:32:17 -0000 1.41
+++ receiver.c 10 Mar 2003 11:48:27 -0000
@@ -192,11 +192,14 @@
if (f) {
*f = 0;
+ if (strlen(f+1) > 200) f += 10;
snprintf(fnametmp,MAXPATHLEN,"%s/.%s.XXXXXX",
fname,f+1);
*f = '/';
} else {
- snprintf(fnametmp,MAXPATHLEN,".%s.XXXXXX",fname);
+ f = fname;
+ if (strlen(f) > 200) f += 10;
+ snprintf(fnametmp,MAXPATHLEN,".%s.XXXXXX",f);
}
return 1;