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

[debian-users:31006] Re: ftpmirror 1.2l で ftp.jp.debian.org のミラーができません



竜@コンプネットです

| Kenshi Muto <kmuto@xxxxxxxxxxxxxxx> wrote at 2001/12/15 20:27:41
|     quote from '[debian-users:31002] Re: ftpmirror 1.2l で ftp.jp.debian.org のミラーができません'
| ___ Message-ID: <20011215112739.B562D53814@xxxxxxxxxxxxxxxxxxxxxx>
> 
> ftpmirrorのコードを見てみました。
> で、ディレクトリ一覧を見るのにftpのSTATコマンドを叩いていますが、この
> 結果がproftpdとwu-ftpdで違っています。
> 
> proftpd:
> 211-status of .:
> 211-drwxr-xr-x   8 ftpadm   ftpadm       4096 Dec 15 11:10 debian
> 211 End of Status
> 
> wu-ftpd:
> 213-status of .:
> total 46022
> -rw-r--r--   1 sys      18733854 Dec 21  2000 00ls_archive
> 213 End of Status
> 
> ftpmirrorのソースで見ると、^2\d\dを削除するようにしています。よって、
> proftpdだとファイルは1つもないように解釈されてしまうのでしょう。

うぅぅむ。

破れかぶれで、proftpd対応パッチを作りました。「とりあえず動きゃ良
し」バージョンなので、ろくなテストもしていません。
STATの出力を wu-ftp like に変換しているつもりです。

----
$ cat ftpmirror-1.2l.proftpd.patch
To apply this patch, cd into the ftpmirror source directory and
run the patch command like this:
        $ patch -s -p1 < this-patch-file

Note: For ftpmirror-1.2l, this patch is.

--- ./ftpmirror.orig    Sat Dec 15 23:32:16 2001
+++ ./ftpmirror Sat Dec 15 23:32:21 2001
@@ -708,6 +708,8 @@
  ;# Get update information from the server
  if ($p->{'load-remote-dirinfo'}
   && defined($_ = &ftp::stat("$dir/$dirinfo"))) {
+  s/2\d\d-[-dl]([-r][-w][-x]){3}[^\r\n]*\.\.?\r?\n//g;
+  s/2\d\d-([-dl]([-r][-w][-x]){3}[^\r\n]*\r?\n)/\1/g;
   1 while s/^2\d\d-[^\r\n]*\r?\n//;
   s/2\d\d [^\r\n]*\r?\n$//;
   @list = split(/\r?\n/); # remote entry
@@ -761,6 +763,8 @@
  ;# get a list of remote directory
  if ($p->{'ftp-list-method'} ne 'list'
   && defined($_ = &ftp::stat($d))) {
+  s/2\d\d-[-dl]([-r][-w][-x]){3}[^\r\n]*\.\.?\r?\n//g;
+  s/2\d\d-([-dl]([-r][-w][-x]){3}[^\r\n]*\r?\n)/\1/g;
   1 while s/^2\d\d-[^\r\n]*\r?\n//;
   s/2\d\d [^\r\n]*\r?\n$//;
   @list = split(/\r?\n/); # remote entry
$
----

____
Nakane Ryuji  living at Nagoya
// mailto:ryuu@xxxxxxxxxx
// business http://nagoya.cool.ne.jp/ryuu2/Compnet/
// private  http://www.jade.dti.ne.jp/~ryuu/bernese/
// PGP Key fingerprint
//   DH/DSS  B746 156A 32CA DEB4 AB5B  AB6B E634 464C 02EA 4814