Juhu *, Wer sich schon immer mal gewundert hat warum die rsync include/exclude dinger nicht so wirklich funktionieren - Habe mit meinen Bugreports gerade nen glibc 2.0 bug aufgedeckt ... :( glibc 2.1.2 ist gefixed .... So long ... Flo ----- Forwarded message from Dave Dykstra <dwd@bell-labs.com> ----- Message-Id: <9910261418.ZM26964@ihgp1.ih.lucent.com> Date: Tue, 26 Oct 1999 14:18:54 -0500 References: <E10272884C59D211B75500A0C9DCFA8A34EB1E@jupiter.orbit-chicago.com> <19991026165524.J1207@paradigm.rfc822.org> <9910261020.ZM25064@ihgp1.ih.lucent.com> <19991026173800.B13848@paradigm.rfc822.org> Reply-To: Dave Dykstra <dwd@bell-labs.com> To: Florian Lohoff <flo@rfc822.org> Subject: Re: include/exclude mess/-> libpcre ? Cc: Multiple recipients of list RSYNC <rsync@samba.anu.edu.au> On Oct 26, 5:38pm, Florian Lohoff wrote:
Works for me. Are you using rsync 2.3.1?
Yes - No-go ...
#!/bin/sh
rsync -vv -Hlrt --delete \ --include "/potato/" \ --include "/potato/*" \ --include "/potato/*/source" \ --include "/potato/*/source/**" \ --exclude "**" \ source.rfc822.org::debian/dists/potato \ /tmp/try
[...] receiving file list ... done created directory /tmp/try potato/ deleting in potato potato/contrib/ potato/contrib/binary-all/ potato/contrib/binary-all/admin/ potato/contrib/binary-all/base/ potato/contrib/binary-all/comm/ [...]
(root@source)~# rsync --version rsync version 2.3.1 protocol version 20
Written by Andrew Tridgell and Paul Mackerras
(root@paradigm)~$ rsync --version rsync version 2.3.1 protocol version 20
Written by Andrew Tridgell and Paul Mackerras
Aha, it only failes on Linux, not on solaris. Looks to me like the Linux fnmatch() with option FNM_PATHNAME is broken: it doesn't stop at slashes like it is supposed to. I tried it out on Redhat 6.0 with the following test program: #include "fnmatch.h" int main(int argc,char **argv) { printf("fnmatch(%s,%s,FNM_PATHNAME): %d\n",argv[1],argv[2], fnmatch(argv[1],argv[2],FNM_PATHNAME)); return(0); } This reports a match with "a/b/* a/b/c/d". Can somebody knowledgable in Linux bug reporting/fixing followup? I tried forcing rsync's configure to use its builtin fnmatch, but more will need to be done because then it complains about some missing defines. The man page descriptions of FNM_PATHNAME are different: Solaris: If set, a slash (/) character in string will be explicitly matched by a slash in pattern; it will not be matched by either the asterisk (*) or question-mark (?) special characters, nor by a bracket ([]) expression. If not set, the slash character is treated as an ordinary character. Linux: If this flag is set, match a slash in string only with a slash in pattern and not, for example, with a [] - sequence containing a slash. but I think they intend to say the same thing. - Dave Dykstra ----- End forwarded message ----- -- Florian Lohoff flo@rfc822.org +49-5241-470566 ... The failure can be random; however, when it does occur, it is catastrophic and is repeatable ... Cisco Field Notice
Teilnehmer (5)
-
Cord Beermann
-
Florian Lohoff
-
Jan-Benedict Glaw
-
Michael Westermann
-
michael@microdata-pos.de