--- ftpmirror-1.96+dfsg.orig/debian/install
+++ ftpmirror-1.96+dfsg/debian/install
@@ -0,0 +1,26 @@
+#ftpmirror.cf-sample	etc/ftpmirror
+debian/ftpmirror.cf	etc/ftpmirror
+debian/list.daily	etc/ftpmirror
+debian/list.monthly	etc/ftpmirror
+debian/list.weekly	etc/ftpmirror
+
+ftpmirror 		usr/sbin
+
+Fan/Fan.pm 		usr/share/ftpmirror
+Fan/Attrib/Attrib.pm	usr/share/ftpmirror/Fan
+Fan/Cool/Cool.pm	usr/share/ftpmirror/Fan
+Fan/DIR/DIR.pm		usr/share/ftpmirror/Fan
+Fan/Farm/Farm.pm	usr/share/ftpmirror/Fan
+Fan/FTP/FTP.pm		usr/share/ftpmirror/Fan
+Fan/HTTP/HTTP.pm	usr/share/ftpmirror/Fan
+Fan/Loader/Loader.pm	usr/share/ftpmirror/Fan
+Fan/MD5/MD5.pm		usr/share/ftpmirror/Fan
+Fan/Param/Param.pm	usr/share/ftpmirror/Fan
+Fan/Scan/Scan.pm	usr/share/ftpmirror/Fan
+Fan/TCP/TCP.pm		usr/share/ftpmirror/Fan
+Fan/Usage/Usage.pm	usr/share/ftpmirror/Fan
+
+Fan/Param/Param.pm	usr/lib/ftpmirror/Fan
+
+Fan/blib/arch/auto	usr/lib/ftpmirror
+Fan/blib/lib/auto	usr/lib/ftpmirror
--- ftpmirror-1.96+dfsg.orig/debian/ftpmirror.html
+++ ftpmirror-1.96+dfsg/debian/ftpmirror.html
@@ -0,0 +1,104 @@
+Content-type: text/html
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML><HEAD><TITLE>Man page of FTPMIRROR</TITLE>
+</HEAD><BODY>
+<H1>FTPMIRROR</H1>
+Section: Maintenance Commands (8)<BR>Updated: January 29, 2007<BR><A HREF="#index">Index</A>
+<HR>
+
+
+
+
+
+
+
+
+
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H2>NAME</H2>
+
+ftpmirror - Mirroring directory hierarchy using FTP protocol
+<A NAME="lbAC">&nbsp;</A>
+<H2>SYNOPSIS</H2>
+
+<B>ftpmirror</B>
+
+[<I>package</I>]
+
+<A NAME="lbAD">&nbsp;</A>
+<H2>DESCRIPTION</H2>
+
+
+
+
+<B>ftpmirror</B> is an utility to copy directory hierarchy (usually
+called 'mirror') using FTP protocol.
+<P>
+
+A similar perl script exists, whose name is 'mirror',
+but ftpmirror requires less memory than mirror.
+<A NAME="lbAE">&nbsp;</A>
+<H2>OPTIONS</H2>
+
+Traditionally ftpmirror mirroring operation was MASTER-&gt;SLAVE but since version 1.96 the SLAVE-&gt;MASTER (reverse mirror) is supported.
+<BR>
+
+This behaviour can be controlled for each package section in the main configuration file (/etc/ftpmirror/ftpmirror.cf).
+<P>
+
+MASTER-&gt;SLAVE  --&gt; get-mode = yes (default)
+<BR>
+
+SLAVE-&gt;MASTER  --&gt; put-mode = yes
+<A NAME="lbAF">&nbsp;</A>
+<H2>EXAMPLES</H2>
+
+<B>ftpmirror</B>
+
+provides a 'ready-to-use' sample package for testing porpouses. In order to run the provided test package you need to issue the following commands (both commands must be run by the same user):
+<P>
+
+mkdir -p /tmp/upstream
+<BR>
+
+/usr/bin/ftpmirror upstream
+<P>
+
+This package should copy directory hierarchy from the original author's FTP location (<A HREF="ftp://ftp.intec.co.jp/pub/utils/ftpmirror/">ftp://ftp.intec.co.jp/pub/utils/ftpmirror</A>) to your local hard drive (/tmp/upstream)
+<A NAME="lbAG">&nbsp;</A>
+<H2>SEE ALSO</H2>
+
+For other supported configuration options see /etc/ftpmirror/ftpmirror.cf where you will find commented examples.
+<A NAME="lbAH">&nbsp;</A>
+<H2>AUTHOR</H2>
+
+ftpmirror was originally written by Ikuo Nakagawa &lt;<A HREF="mailto:ikuo@intec.co.jp">ikuo@intec.co.jp</A>&gt;
+<P>
+
+This manual page was written by Dario Minnucci &lt;<A HREF="mailto:debian@midworld.net">debian@midworld.net</A>&gt;,
+for the Debian project (but may be used by others).
+<P>
+
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAE">OPTIONS</A><DD>
+<DT><A HREF="#lbAF">EXAMPLES</A><DD>
+<DT><A HREF="#lbAG">SEE ALSO</A><DD>
+<DT><A HREF="#lbAH">AUTHOR</A><DD>
+</DL>
+<HR>
+This document was created by
+<A HREF="/cgi-bin/man/man2html">man2html</A>,
+using the manual pages.<BR>
+Time: 20:15:17 GMT, January 29, 2007
+</BODY>
+</HTML>
--- ftpmirror-1.96+dfsg.orig/debian/NEWS.Debian
+++ ftpmirror-1.96+dfsg/debian/NEWS.Debian
@@ -0,0 +1,17 @@
+ftpmirror for Debian
+--------------------
+
+This version of ftpmirror was built using a new upstream code (ftpmirror-1.96) labeled as 'beta' by the author and should solve previous registered bugs.
+
+Please, note that the configuration file location, name and format differs from previous versions.
+
+The configuration file is now located at /etc/ftpmirror/ftpmirror.cf
+
+Traditionally ftpmirror mirroring operation was MASTER->SLAVE but since this version the SLAVE->MASTER (reverse mirror) is supported.
+
+This behaviour can be controlled for each package section in the main configuration file (/etc/ftpmirror/ftpmirror.cf) using the 'get-mode' OR 'put-mode' option.
+ 
+	MASTER->SLAVE  --> get-mode = yes (default)
+	SLAVE->MASTER  --> put-mode = yes
+
+ -- Dario Minnucci <debian@midworld.net>  Sat, 20 Jan 2007 17:58:00 +0100
--- ftpmirror-1.96+dfsg.orig/debian/cron.weekly
+++ ftpmirror-1.96+dfsg/debian/cron.weekly
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# File: /etc/cron.weekly/ftpmirror
+# Description: Cron script to save a log of ftpmirror tasks.
+# Author: Dario Minnucci <debian@midworld.net>
+# 
+
+CONFIG_DIR=/etc/ftpmirror
+LOG_FILE=/var/log/ftpmirror/ftpmirror.weekly
+
+#
+# Don't run if this package is removed but not purged
+#
+if [ ! -f /usr/sbin/ftpmirror ]; then
+    exit 0
+fi
+
+
+#
+# Logging section
+#
+if [ -x /usr/bin/savelog ]; then
+    savelog -c 7 -m 644 -u root -g root $LOG_FILE >/dev/null
+fi
+
+exec >$LOG_FILE 2>&1
+
+
+#
+# Get package list from /etc/ftpmirror/list.weekly
+#
+PACKAGES=`cat ${CONFIG_DIR}/list.weekly | grep -v '#'`
+
+for i in $PACKAGES; do
+
+    TIMESTAMP=`date +"%Y-%m-%d %H:%M:%S"`
+
+    echo ""
+    echo "---------------------------------------------------------"
+    echo " $TIMESTAMP - Package to process: $i"
+    echo "---------------------------------------------------------"
+
+    # Process parsed package
+    /usr/sbin/ftpmirror $i
+
+done
+
+exit 0
--- ftpmirror-1.96+dfsg.orig/debian/list.monthly
+++ ftpmirror-1.96+dfsg/debian/list.monthly
@@ -0,0 +1,11 @@
+#
+# ftpmirror cron.monthly task list
+# 
+# Write here the names of the packages you need to process monthly.
+# This file provides the package names used by cron.monthly job.
+# 
+# The list of packages must be written one per line and must be already
+# defined in the main configuration file (/etc/ftpmirror/ftpmirror.cf)
+# 
+# Please, remember that spaces are not allowed in package names. 
+#
--- ftpmirror-1.96+dfsg.orig/debian/ftpmirror.cf
+++ ftpmirror-1.96+dfsg/debian/ftpmirror.cf
@@ -0,0 +1,132 @@
+# login name for ftp session.
+# ftp-user = anonymous
+
+# password must be e-mail address.
+# ftp-pass = ftp-admin@your.domain.name
+
+# if no listing method required, http proxy can be used.
+# http-proxy = proxy.your.net.com
+
+# do you like passive mode for data transfer?
+# ftp-passive = yes
+
+# to force to get mtime (by MDTM ftp command) uncomment this.
+# ftp-force-mtime = yes
+
+# uncomment the next line to see ftp statistics report.
+# ftp-stats = yes
+
+# to list up all available files, uncomment the next line.
+# log-mask = main=6
+
+# if you'd like to unlink no file, set unlink to false.
+# unlink = no
+
+# by default, $TMPDIR or "/tmp" is used for the temporary directory.
+# temp-directory = /tmp
+
+# generic directories (%s will be replaced with package name).
+remote-directory = /pub/%s
+local-directory  = ~ftp/pub/%s
+
+# to use FTP Archive Revision Manager, setup db directories.
+# for master servers:
+# master-db-directory  = ~ftp/db/%s
+
+# and for slave server:
+# remote-db-directory  = /db/%s
+# local-db-directory  = ~ftp/db/%s
+
+# we will set up the lock-directory parameter, automatically
+# (lock-directory = temp-directory is default).
+# lock-directory = /tmp
+
+# regexp to GET from remote server.
+transfer-file-regexp += !/~$/
+transfer-file-regexp += !/\/#/
+transfer-file-regexp += !/\/\.#/
+transfer-file-regexp += !/\/\.cache/
+transfer-file-regexp += !/\/\.message/
+transfer-file-regexp += !/\/\.mirror/
+transfer-file-regexp += !/\/\.nfs/
+transfer-file-regexp += !/\/\.notready/
+transfer-file-regexp += !/\/\.in/
+transfer-file-regexp += !/\/\.desc\.txt$/
+transfer-file-regexp += !/\/core$/
+transfer-file-regexp += !/\.core$/
+
+# regexp to GET from remote server.
+transfer-directory-regexp += !/~\/$/
+transfer-directory-regexp += !/\/lost\+found\/$/
+
+# FreeBSD's remote and local directories are generic form.
+package = FreeBSD
+ ftp-server = ftp.freebsd.org
+
+# GNU archives on RingServers also have generic directories.
+package = GNU
+ ftp-server = ring.nacsis.ac.jp
+
+# mirror the Apache's tree from a RingServer.
+package = net/apache
+ ftp-server = ring.asahi-net.or.jp
+
+# directories can be specified as follows:
+package = sendmail
+ ftp-server = ftp.kyoto.wide.ad.jp
+ remote-directory = /mail/sendmail
+ local-directory = ~ftp/pub/mail/sendmail
+
+# mirror the whole tree from a RingServer.
+package = ring.aist.go.jp
+ ftp-server = ring.aist.go.jp
+ remote-directory = /
+ local-directory = ~ftp
+ override-directory-regexp += /^\.\/$/
+ override-directory-regexp += /^\.\/pub\//
+ override-directory-regexp += /^\.\/ring\//
+ override-directory-regexp += !
+
+# copy web pages to a remote server (put mode).
+package = webcopy
+ ftp-server = www.intec.co.jp
+ ftp-user = www
+ ftp-pass = nan-jara-hoi
+ ftp-passive = yes
+ put-mode = yes
+ remote-directory = /usr/local/etc/httpd/htdocs
+ local-directory = ~www/htdocs
+
+# if remote FTP server support index files, set db directories.
+package = utils
+ ftp-server = ftp.intec.co.jp
+ remote-db-directory = /db/%s
+ local-db-directory = ~ftp/db/%s
+
+#
+# Sample configuration for 'upstream' package
+# (added on 2007-01-29 for Debian packaging)
+#
+# Original upstream available at:
+# ftp://ftp.intec.co.jp/pub/utils/ftpmirror
+#
+# In order to test this package you need to create
+# /tmp/upstream directory manually and issue the
+# following command: 
+# 
+#    /usr/sbin/ftpmirror upstream
+# 
+package = upstream
+ ftp-server = ftp.intec.co.jp
+ ftp-user = anonymous
+ ftp-pass = mail@example.com
+ ftp-stats = yes
+ verbose=1
+ debug=0
+# ftp-passive = yes
+# put-mode = yes
+# remote-db-directory = /tmp/ftpmirror-remote/%s
+# local-db-directory = /tmp/ftpmirror-local/%s
+ remote-directory = /pub/utils/ftpmirror
+ local-directory = /tmp/upstream
+
--- ftpmirror-1.96+dfsg.orig/debian/links
+++ ftpmirror-1.96+dfsg/debian/links
@@ -0,0 +1 @@
+etc/ftpmirror		usr/share/ftpmirror/config
--- ftpmirror-1.96+dfsg.orig/debian/README.Debian
+++ ftpmirror-1.96+dfsg/debian/README.Debian
@@ -0,0 +1,14 @@
+ftpmirror for Debian
+----------------------
+
+  1. The default configuration file for ftpmirror is /etc/ftpmirror/ftpmirror.cf
+
+  2. To mirror packages automatically:
+
+    * Edit /etc/ftpmirror/list.{daily|weekly|monthly}. Each file should 
+      contains a list of package names (one package per line) which you 
+      want to mirror every day, week, and/or month, respectively.
+    * Uncomment appropriate lines in /etc/ftpmirror/ftpmirror.conf
+
+ -- Dario Minnucci <debian@midworld.net>, Fri, 07 Dec 2007 05:48:16 +0100
+
--- ftpmirror-1.96+dfsg.orig/debian/list.weekly
+++ ftpmirror-1.96+dfsg/debian/list.weekly
@@ -0,0 +1,11 @@
+#
+# ftpmirror cron.weekly task list
+# 
+# Write here the names of the packages you need to process weekly.
+# This file provides the package names used by cron.weekly job.
+# 
+# The list of packages must be written one per line and must be already
+# defined in the main configuration file (/etc/ftpmirror/ftpmirror.cf)
+# 
+# Please, remember that spaces are not allowed in package names. 
+#
--- ftpmirror-1.96+dfsg.orig/debian/changelog
+++ ftpmirror-1.96+dfsg/debian/changelog
@@ -0,0 +1,208 @@
+ftpmirror (1.96+dfsg-10) unstable; urgency=low
+
+  * Updated to debhelper 7
+  * Bumped Standards-Version to 3.8.3:
+      debian/README.source: Added.
+  * debian/rules: Fixes. 
+  * debian/copyright: Adapted to DEP5
+    (see http://dep.debian.net/deps/dep5/ for details)
+  * debian/rules: Fixes and improvements.
+
+ -- Dario Minnucci (midget) <debian@midworld.net>  Fri, 11 Sep 2009 07:28:45 +0200
+
+ftpmirror (1.96+dfsg-9) unstable; urgency=low
+
+  * debian/patches/07-deal_with_unresolved_UIDs_and_GIDs.dpatch:
+    Deal with unresolved UIDs and GIDs in the FTP session (Closes: #504482)
+    Thanks to Steffen Neumann <sneumann@ipb-halle.de> for the patch.
+
+ -- Dario Minnucci (midget) <debian@midworld.net>  Mon, 10 Nov 2008 13:54:24 +0100
+
+ftpmirror (1.96+dfsg-8) unstable; urgency=low
+
+  * debian/copyright: RSA copyright statement added. (Closes: #491485) 
+
+ -- Dario Minnucci (midget) <debian@midworld.net>  Sun, 20 Jul 2008 13:52:16 +0200
+
+ftpmirror (1.96+dfsg-7) unstable; urgency=low
+
+  * Revert accidental removal. (Re: #490982) 
+
+ -- Dario Minnucci (midget) <debian@midworld.net>  Sat, 19 Jul 2008 19:29:54 +0200
+
+ftpmirror (1.96+dfsg-6) unstable; urgency=low
+
+  * debian/doc-base: Deprecated Maintainer field removed.
+  * debian/doc-base: Section name fixed.
+  * debian/watch: Added dversionmangle option.
+  * debian/install: Inclusion of built source suppressed. (Closes: #488167)
+  * debian/control: Added missing substvars. (Closes: #488162)
+  * debian/copyright: MPCF (Machine-Parsable Copyright Format) implementation. 
+    Visit http://wiki.debian.org/Proposals/CopyrightFormat for details.
+
+ -- Dario Minnucci (midget) <debian@midworld.net>  Fri, 27 Jun 2008 04:12:38 +0200
+
+ftpmirror (1.96+dfsg-5) unstable; urgency=low
+
+  * debian/control: Bumped Standards-Version to 3.7.3
+  * debian/rules: Files now intalled through debian/install. (Closes: #454393)
+  * debian/patches/02-perl-libs-path-fix.dpatch: updated.
+  * debian/patches/04-config-sample-packages.dpatch not longer applied. 
+    The default configuration file was rewritten (debian/ftpmirror.cf) and 
+    ftpmirror.cf-sample is not longer distributed.
+  * debian/patches/00list: 04-config-sample-packages has been disabled.
+  * debian/install: Arch-dependent-files relocated to /usr/lib/ftpmirror.
+  * debian/watch: Useless comment removed.
+  * debian/docs: NEWS.Debian not needed (removed).
+  * debian/README.Debian: Typos fixed.
+  * debian/control: Homepage tag added.
+  * debian/ftpmirror.8: Manual page minor improvement.
+
+ -- Dario Minnucci (midget) <debian@midworld.net>  Fri, 07 Dec 2007 06:22:39 +0100
+
+ftpmirror (1.96+dfsg-4) unstable; urgency=low
+
+  * debian/watch: Check for version 1.96x instead of 1.2x (Closes: #417812)
+  * patches/06-translated-files.dpatch:
+      Added translation into English for README.jis and RELEASE.jis
+      Thanks to Fumihito YOSHIDA <hito@kugutsu.org> (Closes: #419150)
+  * debian/rules: Changes to get rid of lintian warning.
+
+ -- Dario Minnucci (midget) <debian@midworld.net>  Mon, 16 Jul 2007 03:02:20 +0200
+
+ftpmirror (1.96+dfsg-3) unstable; urgency=low
+
+  * debian/ftpmirror.8: Manual page was improved.
+  * debian/patches: Patch files were renamed for better tracking.
+  * Fan/MD5/rfc1321.txt: Remove the RFC document. (Closes: #415750)
+ 
+ -- Dario Minnucci <debian@midworld.net>  Fri, 23 Mar 2007 07:48:25 +0100
+
+ftpmirror (1.96-2) unstable; urgency=low
+
+  * debian/doc-base: Added missing 'Files:' tag which closes RC that
+    rendered ftpmirror unusable when doc-base was present in the system.
+    Thanks to 'des' (A.k.a Damian Viano) for enlight me and help me 
+    with testing. (Closes: #409818)
+  * README.Debian: A few corrections on the information given
+  * debian/copyright: Correction on debianize authors to respect
+    previous credits
+
+ -- Dario Minnucci <debian@midworld.net>  Tue,  6 Feb 2007 13:15:05 +0100
+
+ftpmirror (1.96-1) unstable; urgency=low
+
+  * New maintainer's email address <debian@midworld.net>
+  * New upstream version 1.96
+    - Fixes date issues with Windows ftp server. (Closes: #346390)
+  * Manpage updated
+  * Added cron.{daily|weekly|monthly} facilities present in previous version
+  * Issued a NEWS.Debian file
+  * Issued a README.Debian file
+  * A few patches has been created for debianization:
+    - config-path-fix.dpatch
+    - config-sample-packages.dpatch
+    - perl-libs-path-fix.dpatch
+    - perl-path-fix.dpatch
+    - supress-password-output.dpatch
+
+ -- Dario Minnucci <debian@midworld.net>  Tue, 30 Jan 2007 06:19:38 +0100
+
+ftpmirror (1.2l-10) unstable; urgency=low
+
+  * New maintainer (Closes: #353635) 
+  * debian/control: Bumped Standards-Version to 3.7.2, no changes.
+  * debian/control: Moved debhelper and dpatch from Build-Depends-Indep
+    to Build-Depends
+
+ -- Dario Minnucci <midget@powered-by-linux.com>  Wed, 10 Jan 2007 20:44:01 +0100
+
+ftpmirror (1.2l-9) unstable; urgency=low
+
+  * QA upload.
+  * Package is orphaned (#353635); set maintainer to Debian QA Group.
+  * Switch to debhelper 5.
+  * Convert ad-hoc patch system to dpatch.
+  * debian/doc-base: Fix typo.
+  * debian/watch: Add.
+  * Conforms to Standards version 3.6.2.
+
+ -- Matej Vela <vela@debian.org>  Sat, 11 Mar 2006 22:48:10 +0100
+
+ftpmirror (1.2l-8) unstable; urgency=low
+
+  * ftpmirror.8: /usr/doc -> /usr/share/doc (Closes: Bug#189328)
+
+ -- Takao KAWAMURA <kawamura@debian.org>  Thu,  3 Jul 2003 12:41:51 +0900
+
+ftpmirror (1.2l-7) unstable; urgency=low
+
+  * Applied a patch to making ftpmirror work with Perl5.6.
+    Thanks Olaf Peters! (Closes: Bug#123941)
+
+ -- Takao KAWAMURA <kawamura@debian.org>  Tue, 16 Apr 2002 10:52:11 +0900
+
+ftpmirror (1.2l-6) unstable; urgency=low
+
+  * Applied a patch to stop sending the user name as password. Thanks
+    eperez@dei.inf.uc3m.es! (Closes: Bug#133187)
+
+ -- Takao KAWAMURA <kawamura@debian.org>  Thu, 14 Feb 2002 12:55:09 +0900
+
+ftpmirror (1.2l-5) unstable; urgency=high
+
+  * Applied a y2k patch written by Fumitoshi UKAI <ukai@debian.or.jp>.
+  * Added doc-base support.
+
+ -- Takao KAWAMURA <kawamura@debian.org>  Tue, 21 Dec 1999 12:33:38 +0900
+
+ftpmirror (1.2l-4) unstable; urgency=low
+
+  * FHS-compliant
+
+ -- Takao KAWAMURA <kawamura@debian.org>  Sun, 19 Sep 1999 11:57:50 +0900
+
+ftpmirror (1.2l-3) unstable; urgency=low
+
+  * /etc/cron.{daily,weekly.monthly}/ftpmirror: corrected the order of
+    the argments for savelog.
+
+ -- Takao KAWAMURA <kawamura@debian.org>  Tue, 17 Aug 1999 12:48:58 +0900
+
+ftpmirror (1.2l-2) unstable; urgency=low
+
+  * Initial Release for Debian (previous versions were uploaded to Debian
+    JP Project).
+  * Applied the following patch:
+        --- lsparse.pl.orig     Thu Jul  1 11:33:48 1999
+        +++ lsparse.pl  Thu Jul  1 11:33:59 1999
+        @@ -264 +264 @@
+        - s/^(.)([-r][-w].[-r][-w].[-r][-w].)\s*// || do {
+        + s/^\s*(.)([-r][-w].[-r][-w].[-r][-w].)\s*// || do {
+  * Moved /usr/lib/ftpmirror/{ftpmirror,mkdirinfo} into /usr/sbin.
+  * Removed /usr/lib/ftpmirror/{COPYRIGHT,README.*}.
+  * Moved /usr/lib/ftpmirror/ to /usr/share/ftpmirror/.
+  * Installed man pages for ftpmirror and mkdirinfo.
+  * Added an automatic mirroring mechanism through cron.
+  * Updated to Standards-Version 2.5.0.
+
+ -- Takao KAWAMURA <kawamura@debian.org>  Thu,  1 Jul 1999 12:05:08 +0900
+
+ftpmirror (1.2l-1) unstable frozen; urgency=low
+
+  * New upstream version
+  * change to: /usr/lib/ftpmirror/config -> /etc/ftpmirror
+
+ -- takeshi <takeshi@SoftAgency.co.jp>  Tue, 8 Nov 1998 12:04:59 +0900
+
+ftpmirror (1.2k-2) unstable; urgency=low
+
+  * fix debian control file.
+
+ -- takeshi <mtakeshi@mail.at-m.or.jp>  Mon, 4 Aug 1997 16:33:59 +0900
+
+ftpmirror (1.2k-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- takeshi <mtakeshi@mail.at-m.or.jp>  Thu, 24 Jul 1997 22:26:19 +0900
--- ftpmirror-1.96+dfsg.orig/debian/doc-base
+++ ftpmirror-1.96+dfsg/debian/doc-base
@@ -0,0 +1,9 @@
+Document: ftpmirror
+Title: ftpmirror - Mirroring directory hierarchy using FTP protocol
+Author: Ikuo Nakagawa
+Abstract: User's manual for ftpmirror
+Section: Network/File Transfer
+
+Format: HTML
+Index: /usr/share/doc/ftpmirror/ftpmirror.html
+Files: /usr/share/doc/ftpmirror/ftpmirror.html
--- ftpmirror-1.96+dfsg.orig/debian/cron.daily
+++ ftpmirror-1.96+dfsg/debian/cron.daily
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# File: /etc/cron.daily/ftpmirror
+# Description: Cron script to save a log of ftpmirror tasks.
+# Author: Dario Minnucci <debian@midworld.net>
+# 
+
+CONFIG_DIR=/etc/ftpmirror
+LOG_FILE=/var/log/ftpmirror/ftpmirror.daily
+
+#
+# Don't run if this package is removed but not purged
+#
+if [ ! -f /usr/sbin/ftpmirror ]; then
+    exit 0
+fi
+
+
+#
+# Logging section
+#
+if [ -x /usr/bin/savelog ]; then
+    savelog -c 7 -m 644 -u root -g root $LOG_FILE >/dev/null
+fi
+
+exec >$LOG_FILE 2>&1
+
+
+#
+# Get package list from /etc/ftpmirror/list.daily
+#
+PACKAGES=`cat ${CONFIG_DIR}/list.daily | grep -v '#'`
+
+for i in $PACKAGES; do
+
+    TIMESTAMP=`date +"%Y-%m-%d %H:%M:%S"`
+
+    echo ""
+    echo "---------------------------------------------------------"
+    echo " $TIMESTAMP - Package to process: $i"
+    echo "---------------------------------------------------------"
+
+    # Process parsed package
+    /usr/sbin/ftpmirror $i
+
+done
+
+exit 0
--- ftpmirror-1.96+dfsg.orig/debian/ftpmirror.8
+++ ftpmirror-1.96+dfsg/debian/ftpmirror.8
@@ -0,0 +1,242 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.\" Please adjust this date whenever revising the manpage.
+.\" 
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(8)
+.TH "FTPMIRROR" "8" "June 1, 2007" "Dario Minnucci <debian@midworld.net>" ""
+.SH "NAME"
+\fBftpmirror\fR 
+\- Mirroring directory hierarchy using FTP protocol
+.SH "SYNOPSIS"
+.B ftpmirror
+.RI [ package ]
+.SH "DESCRIPTION"
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics, 
+.\" respectively.
+\fBftpmirror\fP is an utility to copy directory hierarchy (usually
+called 'mirror') using FTP protocol.
+.PP 
+A similar perl script exists, whose name is 'mirror',
+but ftpmirror requires less memory than mirror.
+.SH "OPTIONS"
+Please, note that the original documentation about \fBftpmirror\fR was written originally in japanese. (README.jis and RELEASE.jis)
+
+If you can contribute by translating any aspect of these files, please contact Dario Minnucci <debian@midworld.net>. I'll be glad to include your contributions here to improve this manual.
+
+
+Formerly ftpmirror operatio mode was MASTER\->SLAVE but seems that since version 1.96 the SLAVE\->MASTER (reverse mirror) is supported.
+
+This behaviour can be controlled for each package section in the main configuration file (/etc/ftpmirror/ftpmirror.cf).
+
+MASTER\->SLAVE  \-\-> get\-mode = yes (default)
+.br 
+SLAVE\->MASTER  \-\-> put\-mode = yes
+
+
+Other configuration flags extracted from original documentation are:
+(Sorry but most of them are still undocummented.)
+
+.IP todo:
+(string, default: full\-mirror)
+
+.IP verbose:
+(boolean, default: no)
+
+.IP log\-mask:
+(comma separated list)
+
+.IP test\-mode:
+(boolean, default: no)
+
+.IP ftp\-server:
+(string)
+
+.IP ftp\-gateway:
+(string)
+
+.IP ftp\-port:
+(service, default: ftp)
+
+.IP ftp\-bindaddr:
+(ip address)
+
+.IP ftp\-user:
+(string, default: anonymous)
+
+.IP ftp\-pass:
+(string, default: `whoami`@`hostname`)
+
+.IP ftp\-group:
+(string)
+
+.IP ftp\-gpass:
+(string)
+
+.IP ftp\-passive:
+(boolean, default: no)
+To enable passive file transfer set ftp\-passive to yes. 
+
+.IP ftp\-idle:
+(numeric, default: 0)
+
+.IP ftp\-max\-idle:
+(boolean, default: 0)
+
+.IP ftp\-list\-method:
+(LIST or STAT or STAT\-A or STAT\-AT, default: STAT)
+
+.IP ftp\-timeout:
+(numeric, default: 300)
+
+.IP ftp\-login\-retry:
+(numeric)
+
+.IP ftp\-login\-delay:
+(numeric, default: 60)
+
+.IP ftp\-stats:
+(boolean, default: no)
+
+.IP remote\-timezone:
+(timezone string, default: undef)
+
+.IP http\-proxy:
+(string)
+
+.IP server:
+(string)
+
+.IP package:
+(string)
+
+.IP put\-mode:
+(boolean, default: no)
+
+.IP unlink:
+(boolean or 'rename', default: yes)
+
+.IP unlink\-limit:
+(size value, default: 0)
+
+.IP ftp\-force\-mtime:
+(boolean, default: no)
+
+.IP ignore\-mtime:
+(boolean, default: no)
+
+.IP temp\-directory:
+(pathname, default: $TMPDIR || /tmp)
+
+.IP lock\-directory:
+(pathname, default: temp\-directory)
+
+.IP create\-directory:
+(boolean, default: yes)
+
+.IP remote\-directory:
+(string)
+
+.IP local\-directory:
+(pathname)
+
+.IP master\-db\-directory:
+(pathname)
+
+.IP remote\-db\-directory:
+(pathname)
+
+.IP local\-db\-directory:
+(pathname)
+
+.IP lslR\-file:
+(string)
+
+.IP lslR\-copy:
+(pathname)
+
+.IP transfer\-file\-regexp:
+(regexp)
+
+.IP transfer\-directory\-regexp:
+(regexp)
+
+.IP override\-file\-regexp:
+(regexp)
+
+.IP override\-directory\-regexp:
+(regexp)
+
+.IP load\-local\-dirinfo:
+(boolean, default: no)
+
+.IP store\-local\-dirinfo:
+(boolean, default: no)
+
+.IP load\-remote\-dirinfo:
+(boolean, default: no)
+
+.IP override\-file\-uid:
+(uid, default: 0)
+
+.IP override\-file\-gid:
+(uid, default: 0)
+
+.IP override\-file\-mode:
+(octal value, default: 0644)
+
+.IP override\-directory\-mode:
+(octal value, default: 0755)
+
+.IP default\-file\-uid:
+(uid, default: 0)
+
+.IP default\-file\-gid:
+(gid, default: 0)
+
+.IP default\-file\-mode:
+(octal value, default: 0644)
+
+.IP default\-directory\-mode:
+(octal value, default: 0755)
+
+
+.SH "EXAMPLES"
+\fBftpmirror\fR provides a 'ready\-to\-use' sample package for testing porpouses.
+In order to run the provided test package you need to issue the following commands 
+(both commands must be run by the same user):
+
+.PP 
+mkdir \-p /tmp/upstream
+.br 
+/usr/bin/ftpmirror upstream
+.PP 
+This package should copy directory hierarchy from the original author's FTP location
+(ftp://ftp.intec.co.jp/pub/utils/ftpmirror) to your local hard drive (/tmp/upstream).
+
+.SH "IMPORTANT CONSIDERATION"
+The inclusion of this configuration is intended to be used ocassionally. 
+Please don't abuse this site.
+
+
+.SH "SEE ALSO"
+For other supported configuration options see /etc/ftpmirror/ftpmirror.cf 
+where you will find commented examples.
+
+
+.SH "AUTHOR"
+\fBftpmirror\fR was originally written by Ikuo Nakagawa <ikuo@intec.co.jp>
+.PP 
+This manual page was written by Dario Minnucci <debian@midworld.net>,
+for the Debian project (but may be used by others).
--- ftpmirror-1.96+dfsg.orig/debian/manpages
+++ ftpmirror-1.96+dfsg/debian/manpages
@@ -0,0 +1 @@
+debian/*.[1-8]
--- ftpmirror-1.96+dfsg.orig/debian/list.daily
+++ ftpmirror-1.96+dfsg/debian/list.daily
@@ -0,0 +1,11 @@
+#
+# ftpmirror cron.daily task list
+# 
+# Write here the names of the packages you need to process daily.
+# This file provides the package names used by cron.daily job.
+# 
+# The list of packages must be written one per line and must be already
+# defined in the main configuration file (/etc/ftpmirror/ftpmirror.cf)
+# 
+# Please, remember that spaces are not allowed in package names. 
+#
--- ftpmirror-1.96+dfsg.orig/debian/watch
+++ ftpmirror-1.96+dfsg/debian/watch
@@ -0,0 +1,4 @@
+version=3
+#opts=dversionmangle=s/\.dfsg\.\d+$// \
+opts=dversionmangle=s/\+dfsg// \
+ftp://ftp.intec.co.jp/pub/utils/ftpmirror/beta/ftpmirror-(.*)\.tar\.gz
--- ftpmirror-1.96+dfsg.orig/debian/docs
+++ ftpmirror-1.96+dfsg/debian/docs
@@ -0,0 +1,8 @@
+README
+README.html
+README.jis
+RELEASE
+RELEASE.jis
+##debian/NEWS.Debian
+debian/README.Debian
+debian/ftpmirror.html
--- ftpmirror-1.96+dfsg.orig/debian/cron.monthly
+++ ftpmirror-1.96+dfsg/debian/cron.monthly
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# File: /etc/cron.monthly/ftpmirror
+# Description: Cron script to save a log of ftpmirror tasks.
+# Author: Dario Minnucci <debian@midworld.net>
+# 
+
+CONFIG_DIR=/etc/ftpmirror
+LOG_FILE=/var/log/ftpmirror/ftpmirror.monthly
+
+#
+# Don't run if this package is removed but not purged
+#
+if [ ! -f /usr/sbin/ftpmirror ]; then
+    exit 0
+fi
+
+
+#
+# Logging section
+#
+if [ -x /usr/bin/savelog ]; then
+    savelog -c 7 -m 644 -u root -g root $LOG_FILE >/dev/null
+fi
+
+exec >$LOG_FILE 2>&1
+
+
+#
+# Get package list from /etc/ftpmirror/list.monthly
+#
+PACKAGES=`cat ${CONFIG_DIR}/list.monthly | grep -v '#'`
+
+for i in $PACKAGES; do
+
+    TIMESTAMP=`date +"%Y-%m-%d %H:%M:%S"`
+
+    echo ""
+    echo "---------------------------------------------------------"
+    echo " $TIMESTAMP - Package to process: $i"
+    echo "---------------------------------------------------------"
+
+    # Process parsed package
+    /usr/sbin/ftpmirror $i
+
+done
+
+exit 0
--- ftpmirror-1.96+dfsg.orig/debian/dirs
+++ ftpmirror-1.96+dfsg/debian/dirs
@@ -0,0 +1,4 @@
+etc/ftpmirror
+usr/sbin
+usr/share/ftpmirror
+var/log/ftpmirror 
--- ftpmirror-1.96+dfsg.orig/debian/compat
+++ ftpmirror-1.96+dfsg/debian/compat
@@ -0,0 +1 @@
+7
--- ftpmirror-1.96+dfsg.orig/debian/README.source
+++ ftpmirror-1.96+dfsg/debian/README.source
@@ -0,0 +1,9 @@
+README.source
+-------------
+
+ The Debian package uses dpatch(1) for the modifications of the upstream source.
+ If you want to change something it is best to use the dpatch approach as documented
+ in /usr/share/doc/dpatch/README.source.gz
+
+ -- Dario Minnucci <debian@midworld.net>  Fri, 11 Sep 2009 06:34:29 +0200
+
--- ftpmirror-1.96+dfsg.orig/debian/control
+++ ftpmirror-1.96+dfsg/debian/control
@@ -0,0 +1,18 @@
+Source: ftpmirror
+Section: net
+Priority: optional
+Maintainer: Dario Minnucci (midget) <debian@midworld.net>
+Build-Depends: debhelper (>= 7), dpatch, autotools-dev, perl (>= 5.10.0)
+Standards-Version: 3.8.3
+Homepage: ftp://ftp.intec.co.jp/pub/utils/ftpmirror
+
+Package: ftpmirror
+Architecture: any
+Recommends: cron
+Depends: perl (>= 5.10.0), ${shlibs:Depends}, ${perl:Depends}
+Description: Mirroring directory hierarchy using FTP protocol
+ ftpmirror is an utility to copy directory hierarchy (usually
+ called 'mirror') using FTP protocol.
+ .
+ A similar perl script exists, whose name is 'mirror',
+ but ftpmirror requires less memory than mirror.
--- ftpmirror-1.96+dfsg.orig/debian/copyright
+++ ftpmirror-1.96+dfsg/debian/copyright
@@ -0,0 +1,68 @@
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59
+Upstream-Name: ftpmirror
+Upstream-Maintainer: Ikuo Nakagawa <ikuo@jp.freebsd.org>
+Upstream-Source: ftp://ftp.intec.co.jp/pub/utils/ftpmirror/
+
+Files: *
+Copyright: 1995-1999, Ikuo Nakagawa <ikuo@jp.freebsd.org>
+License: other
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  1. Redistributions of source code must retain the above copyright
+     notice unmodified, this list of conditions, and the following
+     disclaimer.
+
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+
+  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+Files: Fan/MD5/md5.h Fan/MD5/MD5.xs
+Copyright: 1991-1992, RSA Data Security, Inc.
+License: other
+
+ License to copy and use this software is granted provided that it
+ is identified as the "RSA Data Security, Inc. MD5 Message-Digest
+ Algorithm" in all material mentioning or referencing this software
+ or this function.
+
+ License is also granted to make and use derivative works provided
+ that such works are identified as "derived from the RSA Data
+ Security, Inc. MD5 Message-Digest Algorithm" in all material
+ mentioning or referencing the derived work.
+
+ RSA Data Security, Inc. makes no representations concerning either
+ the merchantability of this software or the suitability of this
+ software for any particular purpose. It is provided "as is"
+ without express or implied warranty of any kind.
+
+ These notices must be retained in any copies of any part of this
+ documentation and/or software.
+
+
+Files: debian/*
+Copyright:      1997, takeshi <mtakeshi@mail.at-m.or.jp>
+                1998, takeshi <takeshi@SoftAgency.co.jp>
+           1999-2003, Takao KAWAMURA <kawamura@debian.org>
+                2006, Matej Vela <vela@debian.org>
+           2007-2009, Dario Minnucci (midget) <debian@midworld.net>
+License: GPL-2+
+   On Debian systems the full text of the GNU General Public 
+   License can be found in the `/usr/share/common-licenses/GPL-2'
+   file.
+
--- ftpmirror-1.96+dfsg.orig/debian/rules
+++ ftpmirror-1.96+dfsg/debian/rules
@@ -0,0 +1,113 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+include /usr/share/dpatch/dpatch.make
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=0
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+config.status: configure
+	dh_testdir
+	# Add here commands to configure the package.
+	#./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+	LDFLAGS="-Wl,-z,defs" \
+	./configure \
+		--host=$(DEB_HOST_GNU_TYPE) \
+		--build=$(DEB_BUILD_GNU_TYPE) \ 
+		--prefix=/usr \
+		--mandir=\$${prefix}/share/man \
+		--infodir=\$${prefix}/share/info \
+		--sysconfdir=/etc/ftpmirror \
+		--SYSCONFDIR=/etc/ftpmirror \
+
+build: build-stamp
+
+build-stamp: patch-stamp config.status
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+	#docbook-to-man debian/ftpmirror.sgml > ftpmirror.1
+
+
+	touch $@
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+
+	# Add here commands to clean up after the build process.
+	#-$(MAKE) distclean
+	$(MAKE) clean
+
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+	cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+	cp -f /usr/share/misc/config.guess config.guess
+endif
+
+	dh_clean 
+
+	rm -f config.cache
+	rm -f config.guess
+	rm -f config.log
+	rm -f config.status
+	rm -f config.sub
+
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs
+	dh_installchangelogs RELEASE
+	dh_installexamples
+	dh_install
+	dh_installcron
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_perl
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- ftpmirror-1.96+dfsg.orig/debian/patches/01-perl-path-fix.dpatch
+++ ftpmirror-1.96+dfsg/debian/patches/01-perl-path-fix.dpatch
@@ -0,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## perl-path-fix.dpatch by Dario Minnucci <debian@midworld.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Perl executable path fixes.
+
+@DPATCH@
+diff -urNad ftpmirror-1.96~/farm ftpmirror-1.96/farm
+--- ftpmirror-1.96~/farm	1997-09-07 13:16:21.000000000 +0200
++++ ftpmirror-1.96/farm	2007-01-29 05:12:31.486236296 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ 
+ use strict;
+ use vars qw($opt_D $opt_c $opt_l $opt_u $opt_d $opt_o $opt_v);
+diff -urNad ftpmirror-1.96~/ftpmirror ftpmirror-1.96/ftpmirror
+--- ftpmirror-1.96~/ftpmirror	2007-01-29 05:12:09.633570057 +0100
++++ ftpmirror-1.96/ftpmirror	2007-01-29 05:12:16.952453516 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/perl
++#!/usr/bin/perl
+ ;#
+ ;# Copyright (c) 1995-1999
+ ;#	Ikuo Nakagawa. All rights reserved.
--- ftpmirror-1.96+dfsg.orig/debian/patches/06-translated-files.dpatch
+++ ftpmirror-1.96+dfsg/debian/patches/06-translated-files.dpatch
@@ -0,0 +1,1527 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06-translated-files.dpatch by Dario Minnucci (midget) <debian@midworld.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Translation into English for README.jis and RELEASE.jis files.
+## DP: Thanks to Fumihito YOSHIDA <hito@kugutsu.org>.
+
+@DPATCH@
+diff -urNad ftpmirror-1.96+dfsg~/README ftpmirror-1.96+dfsg/README
+--- ftpmirror-1.96+dfsg~/README	1970-01-01 01:00:00.000000000 +0100
++++ ftpmirror-1.96+dfsg/README	2007-07-16 03:20:03.689778896 +0200
+@@ -0,0 +1,616 @@
++                                   FTPMIRROR
++
++Introduction
++
++   Ftpmirror is an utility to copy directory hierarchy (this is called
++   ``mirror'') with FTP. A transfer is triggered only when modified, it can
++   be efficient transferring directory trees.
++
++   It is userful for ftp-servers maintenance, contentns sync with web server,
++   system backupping and so on.
++
++   A similar perl script exists, whose name is `mirror', this implementation
++   is fully comparing directory lists of sources and distination, it take a
++   heavy memmory load. If use on a large directory trees, so eat a lot of
++   memory(or swap) spaces. When I use ftp-server with 16MB memory, 'mirror'
++   software is not usable :-p, so I wrote software from scratch, that is
++   frpmirror. For example, full mirroring of FreeBSD distribution
++   (ftp://ftp.FreeBSD.ORG/pub/FreeBSD/*) needs 8~9 MB. *(Notice by
++   translator) Original document wrote at old(1998). May be this results has
++   obsolete.*
++
++   You need perl-5.003 or later to use ftpmirror. Please ensure that
++   perl-5.003 or later was installed in your environment, at first. But, perl
++   5.004 has a bug of memory leak. It eat a lot of memory spaces when
++   mirroring directory tree. I test with perl5.005, it has small memory leak
++   too, it is smaller than perl 5.004, it is not critical for real usage. I
++   suggest you using Perl 5.005.
++
++How to use ftpmirror
++
++    1. Install ftpmirror first. The newest version of ftpmirror is available
++       from ftp.intec.co.jp.
++
++       Please use these URLs.
++          * ftp://ftp.intec.co.jp/pub/utils/ftpmirror/ : release
++          * ftp://ftp.intec.co.jp/pub/utils/ftpmirror/beta/ : beta
++
++       Since ftpmirror is a archive of instal files, you must only extract
++       the archive. Do one of following:
++
++   % cd /usr/local/src
++ % gzip -cd < /tmp/ftpmirror-x.y.tar.gz | tar xf -
++
++       So create a directory named ftpmirror-x.y. Change directory and
++       execute configure:
++       Notice: If you need define specific perl verions, please set perls
++       path for enviroment variable "PERL".
++
++ % cd ftpmirror-x.y
++ % ./configure
++
++       Or, when you need specific perl version:
++
++ % cd ftpmirror-x.y
++ % env PERL=/usr/local/bin/perl5.005 ./configure
++
++       Execute make:
++
++ % make
++
++       When finished make with no errors. So install:
++
++ % su
++ # make install
++
++       In finished this procedure, so installed files are below paths:
++
++ /usr/local/bin/ftpmirror
++ /usr/local/bin/rotate
++ /usr/local/etc/ftpmirror.cf-sample
++ /usr/local/lib/perl5/site_perl/Fan.pm
++ /usr/local/lib/perl5/site_perl/Fan/...   (and some dirs)
++ /usr/local/lib/perl5/site_perl/auto/Fan/...  (and some dirs)
++
++ * Notice: libraries install directory can changes
++     with perl's installed settings.
++
++       And copying and editing a configuration files, please add difinition
++       what you needs.
++
++ # cd /usr/local/etc
++ # cp ftpmirror.cf-sample ftpmirror.cf
++ # vi ftpmirror.cf
++
++Configuration
++
++       You can define parameters for ftpmirror with the default configuration
++       file, package specific configuration file, and run-time options
++       (commands arguments). In addition, configuration files are set
++       /usr/local/etc/ftpmirror.cf by defauls, it can change by command
++       argument "--load-config=/hoge/local.cf" if you need. And argument
++       "--load-config=+/hogehoge/local.cf" is used, this is append reading
++       after adove defaults reading.
++
++       Configuration parameters have follwoing types.
++
++ Default parametes:
++ Configuration files settings. They are written before
++ Serverss and Packages parameters.
++
++ Server parameters:
++ Difinition of server specific(timeouts, gateways and
++ so on..). They are provided at configuration files,
++ with 'server' parameters.
++
++ Package parameters:
++ Difinition of packages specific(direcotry, transfer
++ modes and so on). They are provided at configuration files,
++ with 'package' parameters.
++
++ Option parameters:
++ It provide by command args.
++
++       Their parameters are settings by adove order(when exists). Option
++       parameters are most prefferd.
++
++       How to settings parameters at configuration files:
++       That has two syntaxr,
++
++ param-name = value
++ or
++ param-name += value
++
++ =  is set param-name by value.
++ += is adding value(strings) for param-name.
++
++       How to settings parameters at commands args:
++       When using by commands args,any parameters must be prepended by "--"
++       in command line options. That use --(two minus) before options. For
++       example, following syntax is same as adove configuration settings.
++
++ % ftpmirror --param-name=value ...
++ % ftpmirror --param-name+=value ...
++
++Parameters
++
++       There are many acceptable parameters as follows:
++          * Parameters for system and behavior
++               * todo:(string, default: full-mirror)
++                 Settings of command behavior. Currently ftpmirror supports
++                 these behavior.
++                    * scan-remote : listup remote sides files.
++                    * scan-local : listup local sides files.
++                    * update-master : update local sides master index.
++                    * synch-remote : synchronize index files.
++                    * step-mirror : mirroring as slave mode.
++                    * full-mirror : execute basic mirroring(default).
++                 In defaults, it set basic mirroring behavior "full-mirror".
++                 *-regexp filters are enabled at first, any behavior works
++                 with these filters.
++               * verbose: (boolean, default: no)
++                 When set yes, transfer logs ouput verbosey. If set yes, logs
++                 output about non-transfererd/non-modified files.
++               * log-mask: (comma separated list, default: none)
++                 Settings about output logs. These difinition separates by
++                 perl libraries. For example, log-mask = Fan=6,Fan::FTP=7 are
++                 set, a output log include filelist of non transfererd/ non
++                 modified, and ftp's verbosey log.
++               * test-mode (boolean, default: no)
++                 dry-run. When set yes, only show filelist of transfer
++                 targets without real transfer.
++          * Parameters for FTP session
++               * ftp-server: (string, default: none)
++                 The server name to connect FTP session. This must be
++                 specified for mirroring.
++               * ftp-gateway: (string, default: none)
++                 Specify this parameter if you use FTP proxy gateway such as
++                 TIS Internet FireWall ToolKit. For example, "ftp-user =
++                 anonymous", "ftp-server = ring.etl.go.jp", "ftp-gateway =
++                 proxy.intec.co.jp" are set, real-connection goes to
++                 proxy.intec.co.jp, and username is anynymou@ring.etl.go.jp
++                 (ftp-pass is through simple). You may define this with
++                 server parameter.
++               * ftp-port: (service, default: ftp) ftp port definition. If
++                 you need change a port number, please set. When nomarlly
++                 usage, it is not necessary.
++               * ftp-bindaddr: (ip address, default: none) ftp local sides IP
++                 address difinitition. This can set a specific difinition of
++                 local ip address. When using multi-homed hosts(The hosts
++                 have multiple ip addresses), this settings provides a clear
++                 log files. When nomarlly usage, it is not necessary.
++               * ftp-user: (string, default: anonymous)
++                 Login name for FTP session. If you want to use anonymous
++                 FTP, please specify "anonymous" as this parameter.
++               * ftp-pass: (string, default: `whoami`@`hostname`)
++                 Password for FTP session.
++               * ftp-group: (string, default: none)
++                 If you want change group id after logged to the server,
++                 specify the group name. This must be specified with
++                 ftp-gpass.
++               * ftp-gpass: (string, default: none)
++                 If you want change group id after logged to the server,
++                 specify a password to change group. This must be specified
++                 with ftp-group.
++               * ftp-passive: (boolean, default: no)
++                 Set this parameter to yes if passive connection(PASV command
++                 in FTP) is required. This helps you if you use ftpmirror
++                 over a SYN/ACK style firewall.
++               * ftp-idle: (numeric, default: 0)
++                 If this parameter is not zero, ftpmirror tries to set idle
++                 timer of FTP session to this value. FTP server must support
++                 SITE IDLE command.
++               * ftp-max-idle: (boolean, default: 0)
++                 If this parameter is not zero, ftpmirror tries to set idle
++                 timer of FTP session to maximum value. FTP server must
++                 support SITE IDLE command.
++               * ftp-list-method: (LIST or STAT or STAT-A or STAT-A or
++                 STAT-AT default: STAT)
++                 You can specify which of STAT or LIST command should be used
++                 to get server's directory entries. Since STAT command
++                 returns server's directory entries over control connection,
++                 it is little faster than LIST command. Some ftp server
++                 software does not returns directory entry which is required
++                 by ftpmirror, in that case you must speficy as
++                 ftp-list-method = list.
++               * ftp-timeout: (numeric, default: 300)
++                 Timeout of connection. Unit is second.
++               * ftp-login-retry: (numeric, default: none)
++                 *This function is not implemented yet.*
++               * ftp-login-delay: (numeric, default: 60)
++               * ftp-stats: (boolean, default: no)
++                 If it set yes, when mirroring is finished, total transaction
++                 staistics is shown. It appear "control connection in/out",
++                 and "data connection in/out" by octet units.
++               * http-Proxy: (string, default: none) http-proxy settings when
++                 you need accessing ftp server with http. But, http cannot
++                 get direcroty information, so use ls-LR file, or using slave
++                 mode.
++                 For example,
++                    * package = FreeBSD
++                    * ftp-server = ftp.tokyonet.ad.jp
++                    * http-proxy = proxy.my.company.com
++                    * remote-directory = /pub/FreeBSD
++                    * local-directory = ~ftp/pub/FreeBSD
++                    * lslR-file = /pub/FreeBSD/ls-lR.Z
++                 Notice: HTTP is usgin per file transfer TCP connection. So
++                 cause large session logs, and heavy latency.
++          * Parameters for a package
++               * server: (boolean, default none)
++                 This is used to define FTP server specific parameters. After
++                 this parameter, any parameter are treated as the server
++                 specific parameter, until package or (next)server parameter
++                 will be found. Especially, it's reasonable to specify
++          * Parameters for a mirroring
++               * unlink:(boolean, default: no)
++                 When set yes, local directory trees are copied to remote
++                 hosts. For example,
++                    * package = webcopy
++                    * ftp-server = www.intec.co.jp
++                    * ftp-user = webadmin
++                    * ftp-pass = nan-jara-hoi
++                    * ftp-passive = yes
++                    * put-mode = yes
++                    * remote-directory = /usr/local/etc/httpd/htdocs
++                    * local-directory = ~ikuo/web/htdocs
++                         * unlink: (boolean or 'rename' default: yes)
++                           Set this parameter "yes" or 1 if you want to
++                           unlink a file which is removed from servers
++                           directory. You may set this parameter as "rename",
++                           in this case, ftpmirror renames a file with a
++                           trailing Tilda('~').
++                         * unlink-limit: (size value, default: 0)
++                           ** !!! This is not support current version. This
++                           is obsolete.**
++                           If this parameter is defined, ftpmirror will not
++                           remove large files or large directories. This may
++                           help you when server side directory hierachy is
++                           dramatically changed. For example, if unlink-limit
++                           is defined as 30M, any file or directory who is
++                           larger than 30Mbytes will not be removed. You may
++                           also specify 500K or 3G as the maximum size. When
++                           unlink-limit is defined as 100 (e.g. no size
++                           suffix), ftpmirror will not remote the directory
++                           who has more than 100 entries.
++                         * ftp-force-mtime:(boolean, default: no)
++                           When it set yes, time comparing is using MDTM
++                           commands.It set no, MDTM commands does not call
++                           using only file transfering.
++                         * ignore-mtime: (boolean, default: no)
++                         * check-mtime: (default: 1)
++                           By default, ftpmirror try to check modified times
++                           of local and remote files. If this parameter is
++                           zero, ftpmirror does NOT check modified time. In
++                           this case, if local and remote files have same
++                           size ftpmirror will only change local file
++                           timestamp to match remote one.
++                         * temp-directory: (pathname, default: /tmp)
++                           Ftpmirror stores temporary files to the directory
++                           specified by this parameter. Currently, ls-lR or
++                           dirinfo files may be stored in this directory.
++                         * lock-directory: (pathname, default: /tmp)
++                           Ftpmirror use lock mechanism to avoid invoking
++                           multiple ftpmirrors for a package. lock-directory
++                           parameter means the directory to create lock file.
++                           local-db
++                         * create-directory : (boolean, default: yes) When
++                           local-directory, temp-directory, lock-directory is
++                           set, but target directories dont exists, case of
++                           set yes to mkdir, set no to not and error
++                           aborting.
++                         * remote-directory: (boolean, default: none)
++                           You must specify the directory on the FTP server
++                           where you want to mirror as this parameter. Any
++                           mirror is recursively performed from this
++                           directory.
++                         * local-directory: (pathname, default: none)
++                           You must set this parameter to the directory in
++                           local-side host, e.g. the directory paired with
++                           remote-directory. Next example shows that
++                           ftpmirror will mirror "/pub/FreeBSD" in the FTP
++                           server to "/ftp/pub/FreeBSD" in local.
++
++ remote-directory = /pub/FreeBSD
++ local-directory = /ftp/pub/FreeBSD
++
++                           If home-directory is defined (or ftp user's home
++                           directory exists), you can specify as follows:
++
++ remote-directory = /pub/FreeBSD
++ local-directory = ~/pub/FreeBSD
++
++                         * master-db-directory: (pathname, default: none)
++                           ftpmirror can store localhosts filelist and last
++                           mirroring datas, if use this features, set
++                           master-db-directory and create storing directory.
++                           For example, following esettings will create
++                           filelist of ~ftp/pub/FreeBSD files. In this case,
++                           "n" is index files revision. And cycle a
++                           mirroring, ~ftp/db/FreeBSD/step.m is created too.
++                           "m" is step files revisions. step.m is diff of
++                           index.m => index.m+1.
++
++         package = FreeBSD
++          ftp-server = ftp.FreeBSD.ORG
++          remote-directory = /pub/%s
++          local-directory = ~ftp/pub/%s
++          master-db-directory = ~ftp/db/%s
++
++                           Addition, when dont use mirroring,
++                           master-db-direcoty can manage directory tree.
++                           Example is below.
++
++         package = original-tools
++          local-directory = ~ftp/pub/%s
++          master-db-directory = ~ftp/db/%s
++
++                           For update database only please execute:
++
++         % ftpmirror --todo=update-master original-tools
++
++                           If remote server has a master-db-directory, it can
++                           use "slave mode" mirroring. Please set
++                           remote-db-directory and local-db-cirectory
++                           parameters.
++                         * remote-db-directory: (pathname, default: none)
++                         * local-db-directory: (pathname, default: none)
++                           When remote server has a remote-db-directory, it
++                           can efficiency mirroring. This called "slave
++                           mode". "slave mode" can be use setting
++                           remote-db-directory and local-db-directory. If you
++                           use it, please create directory that
++                           local-db-directory specified. A parameters of
++                           master-db-directory is must set remote sides
++                           master-db-direcotry.
++                           These parameters can %s conversion(same
++                           local-directry parameters) And, local-db-directory
++                           supports tilda(~) directory conversion. When
++                           remote-db-directory and local-db-directory set,
++                           ftpmirror's behavior is below. At first, starts
++                           sync master-db-directory, second, start mirroring
++                           with db information. In this case, all file
++                           informations are provide by db, so without LIST,
++                           STAT commands. And, database syncronization is not
++                           fully copy, this synthethis a old index file and
++                           step files. Full copy is only apper at two case
++                           one is first copy, one of db files are broken. For
++                           example, using "slave mode" with
++                           adove(master-db-directory's example) server,
++                           sample configuration is below.
++
++         package = FreeBSD
++          ftp-server = ftp.master.server.host
++          remote-directory = /pub/%s
++          local-directory = ~ftp/pub/%s
++          remote-db-directory = /db/%s
++          local-db-directory = ~ftp/db/%s
++
++                           For advence, you can cumulative mirroring with
++                           step files. Configuration is same adove, use:
++
++          % ftpmirror --todo=step-mirror FreeBSD
++
++                         * lslR-file: (pathname, default: none)
++                           You can use ls-lR(or similar) on the FTP server
++                           rather than directory scan with STAT/LIST. Specify
++                           server side filename of ls-lR(or similar) as this
++                           parameter. If lslR-file has an extension of .gz or
++                           .Z, gunzip or uncompress will be automatically
++                           invoked. For example, if you mirror
++                           ftp.freebsd.org:/pub/FreeBSD with ls-lR.gz, you
++                           may specify as next:
++
++ ftp-server = ftp.freebsd.org
++ remote-directory = /pub/FreeBSD
++ local-directory = ~/pub/FreeBSD
++ lslR-file = /pub/FreeBSD/ls-lR.gz
++
++                         * lslR-copy: (pathname, default: none)
++                           When you need archive copying lslR-file on
++                           localhost, set this parameter. If you set a
++                           relative path, a path leading from
++                           local-directory. And, relative path set
++                           override-file parameters automatically. So
++                           lslR-copy is prevent from overwrite with
++                           mirroring. This setting is set, when lslR-file is
++                           transfered, and chacheing to lslR-copy file, then
++                           prevent needless transfer. The check of size/last
++                           modified are non-transferring with lslR-file.
++                           Addition, when you set this parameters, you can
++                           use efficient mirroring with ls-lR file without
++                           lslR-file parameters.
++                         * transfer-file-regexp: (regexp, default: matches
++                           all)
++                           Regular expressions(perl's regular expression) to
++                           match filenames to transfer. Ftpmirror tries to
++                           transfer only files on the server which matches to
++                           this expression. Any filename on the FTP server is
++                           represented as relative path (from
++                           remote-directory) beginning with "./". That is, if
++                           remote-directory is configured as "/pub/FreeBSD",
++                           the file "/pub/FreeBSD/2.1.5-RELEASE/README.TXT"
++                           on the server is represented as
++                           "./2.1.5-RELEASE/README.TXT".
++
++                           Some examples follow:
++
++   transfer-file-regexp += !/~$/
++   transfer-file-regexp += !/\/\.in/
++   transfer-file-regexp += !/\/\.nfs/
++
++                           With this configuration, ftpmirror does NOT
++                           transfer files end with "~" and begin with ".in"
++                           or ".nfs".
++
++                           (Notes: "=" means replacing a parameter value, and
++                           "+=" means appending a parameter string)
++
++   transfer-file-regexp += /\/bash-/
++   transfer-file-regexp += /\/gcc-/
++   transfer-file-regexp += !
++
++                           With adobe configuration, ftpmirror tries to
++                           transfer bash-* and gcc-* files, but not others.
++                           The last line in this example means ftpmirror does
++                           NOT transfer by default.
++                         * transfer-directory-regexp: (default: matches all)
++                           Regular expressions(perl's regular expression) to
++                           match directory names to scan in a FTP server.
++                           Note that any directory in a FTP server is
++                           represented with trailing slash ('/'). For
++                           example, next shows configuration to avoid
++                           ftpmirror NOT to scan(off course, this means NOT
++                           to transfer) directories whose names are
++                           "lost+found", or directories ended with '~'.
++
++   transfer-directory-regexp += !/\/lost+found\/$/
++   transfer-directory-regexp += !/~\/$/
++
++                         * override-file-regexp: (default: matches all)
++                           Regular expressions(perl's regular expression) to
++                           match files you can override in local directories.
++                           In actual mirror session, ftpmirror tries to
++                           transfer files which match transfer-file-regexp,
++                           and also match override-file-regexp. Any file
++                           which does not match override-file-regexp will not
++                           be modified by ftpmirror. In the next example,
++                           ftpmirror tries to transfer bash-* files, but not
++                           modified any other files. This is useful when you
++                           want to get files from multiple FTP servers to a
++                           single local-side directory.
++
++   transfer-file-regexp += /\/bash-/
++   transfer-file-regexp += !
++   override-file-regexp += /\/bash-/
++   override-file-regexp += !
++
++                         * override-directory-regexp: (default: matches all)
++                           Regular expressions(perl's regular expression) to
++                           match directories ftpmirror will modify. You can
++                           transfer directories from multiple FTP servers to
++                           a single local-side directory with this parameter.
++                           Following example shows that you can transfer the
++                           FreeBSD-nonUS into the FreeBSD directory.
++
++   package = FreeBSD
++    ftp-server = ftp.tokyonet.ad.jp
++    remote-directory = /pub/FreeBSD
++    local-directory = ~/pub/FreeBSD
++    override-directory-regexp += !/\.\/FreeBSD-nonUS\//
++
++   package = FreeBSD-nonUS
++    ftp-server = ftp.waseda.ac.jp
++    remote-directory = /pub/FreeBSD-nonUS
++    local-directory = ~/pub/FreeBSD/FreeBSD-nonUS
++
++                         * load-local-dirinfo: (default: 0)
++                           Set this parameter to 1 if you want to load local
++                           ".dirinfo" files. A ".dirinfo" file contains
++                           directory information described below.
++                         * store-local-dirinfo: (default: 0)
++                           Set this parameter to 1 if you want to generate
++                           ".dirinfo" files in local-side directories after
++                           each mirror session. A ".dirinfo" file contains
++                           directory information described below.
++                         * load-remote-dirinfo: (default: 0) Set this
++                           parameter to 1 if you want to load and use
++                           directory information stored in the FTP server.
++                           Using directory information, you can mirror files
++                           without STAT/LIST/SIZE/MDTM, and ftpmirror can
++                           check MD5 checksum of files.
++                         * override-file-uid: (default: 0)
++                           You can specify owner of files/directories in
++                           local. Any files and directories which match
++                           override-*-regexp, will be owned by this user id.
++                           If ftpmirror is invoked by non privileged user,
++                           this parameter is ignored.
++                         * override-file-gid: (default: 0)
++                           Same as override-file-uid, but this parameter is
++                           for group id. Note that if one of
++                           override-file-uid and override-file-gid is
++                           defined, any file which matches override-*-regexp
++                           (even if it is not transfered) will be modified
++                           with chown.
++                         * override-file-mode: (default: root -> 0444, other
++                           -> 0644)
++                           You can specify local-side file mode. Ftpmirror
++                           applies chmod to any file which matches
++                           override-*-regexp if this parameter is specified.
++                         * override-directory-mode: (default: 0755)
++                           Same as override-file-mode, but this parameter is
++                           for directories.
++                         * default-file-uid: (default: 0)
++                           Undef override-file-uid, and set this parameter to
++                           specify default owner of local-side files.
++                           Ftpmirror decides file owner in order:
++                           override-file-uid, owner in FTP server,
++                           default-file-uid.
++                         * default-file-gid: (default: 0)
++                           Same as default-file-uid, but this parameter is
++                           for group id.
++                         * default-file-mode: (default: root -> 0444, other
++                           -> 0644)
++                           Undef override-file-mode and you can specify
++                           default file mode. Ftpmirror tries to change file
++                           mode in order: override-file-mode, file mode in
++                           FTP server, default-file-mode. Note that since
++                           file mode is masked with 0777, you can not set
++                           setuid/setgid file modes.
++                         * default-directory-mode: (default: 0755)
++                           Same as default-file-mode, but this parameter is
++                           for a directory mode.
++                      Ftpmirror tries to compare files in local and remote
++                      with these entries. For example, ftpmirror compares as:
++                        1. file file-type
++                           Are sizes same? and are md5checksums same?
++                        2. symlink file-type
++                           Do they point same file?
++                        3. directory file-type
++                           Is the begin-time of last update of local
++                           directory is before the end-time of last update of
++                           remote directory?
++                      Especially, comparing directory update times are
++                      effective, if no file is changed in the remote
++                      directory, because ftpmirror do nothing about the
++                      directory (even directory scan is skipped).
++
++                      Ftpmirror generate ".dirinfo" file if
++                      store-local-dirinfo parameter is 1. You can also
++                      generate this file with mkdirinfo:
++
++  # mkdirinfo /ftp/pub/utils
++
++Mailing list for ftpmirror
++
++                      Technical questions, suggestions, bug reports are
++                      welcome. If you are interesting to ftpmirror, there is
++                      a mailing-list to discuss about ftpmirror. To
++                      subscribe, send a message
++
++  subscribe ftpmirror
++
++                      to majordomo@ftp.intec.co.jp.
++
++Credits
++
++                      I would like to thank to anyone who helped me by
++                      testing, bug-reports, suggestions, sending patches.
++                      Especially, members in RingProject helped me by heavy
++                      testing :-) and many suggestions.
++
++Miscellaneous...
++
++                      Please read COPYRIGHT for copyright notice. Any
++                      comments, bug fixes, suggestions are welcome. Please
++                      contact to Ikuo Nakagawa <ikuo@intec.co.jp>.
++
++--------------------------------------------------------------------------------
++
++      Last updated: 1997/01/27 by Ikuo Nakagawa
++      This is community translated file. This is not original document.
++
++--------------------------------------------------------------------------------
++
++ Translated into English on 2007-07-07 by Fumihito YOSHIDA <hito@kugutsu.org>.
++
++--------------------------------------------------------------------------------
+diff -urNad ftpmirror-1.96+dfsg~/README.html ftpmirror-1.96+dfsg/README.html
+--- ftpmirror-1.96+dfsg~/README.html	1970-01-01 01:00:00.000000000 +0100
++++ ftpmirror-1.96+dfsg/README.html	2007-07-16 03:16:41.750271019 +0200
+@@ -0,0 +1,732 @@
++<html><head>
++<title>ftpmirror - mirroring directory hierarchy with FTP</title>
++</head><body>
++<h1>FTPMIRROR</h1>
++
++<h2>Introduction</h2>
++
++<p>
++<i>Ftpmirror</i> is an utility to copy directory hierarchy
++(this is called ``mirror'') with FTP.
++
++A transfer is triggered only when modified, it can be efficient 
++transferring directory trees.
++<p>
++It is userful for ftp-servers maintenance, contentns sync with 
++web server, system backupping and so on.  
++<p>
++
++A similar perl script exists, whose name is `mirror', this 
++implementation is fully comparing directory lists of sources
++and distination, it take a heavy memmory load. If use on a 
++large directory trees, so eat a lot of memory(or swap) spaces.
++
++When I use ftp-server with 16MB memory, 'mirror' software is 
++not usable :-p, so I wrote software from scratch, that is 
++frpmirror.
++
++For example, full mirroring of FreeBSD distribution 
++(ftp://ftp.FreeBSD.ORG/pub/FreeBSD/*) needs 8~9 MB.
++*(Notice by translator) Original document wrote at 
++ old(1998). May be this results has obsolete.*
++<p>
++You need perl-5.003 or later to use ftpmirror.
++Please ensure that perl-5.003 or later was installed
++in your environment, at first.
++
++But, perl 5.004 has a bug of memory leak. It eat a 
++lot of memory spaces when mirroring directory tree.
++I test with perl5.005, it has small memory leak too,
++it is smaller than perl 5.004, it is not critical for
++real usage. I suggest you using Perl 5.005.
++
++<h2>How to use <i>ftpmirror</i></h2>
++
++<ol>
++<p>
++<li>Install <i>ftpmirror</i> first.
++ The newest version of <i>ftpmirror</i> is available from
++ <a href=ftp://ftp.intec.co.jp/pub/utils/><b>ftp.intec.co.jp</b></a>.
++
++<p>
++ Please use these URLs.
++ <ul>
++  <li>ftp://ftp.intec.co.jp/pub/utils/ftpmirror/       : release
++  <li>ftp://ftp.intec.co.jp/pub/utils/ftpmirror/beta/  : beta 
++ </ul>
++<p>
++ Since <i>ftpmirror</i> is a archive of instal files,
++ you must only extract the archive.
++ Do one of following:
++ <pre>
++  % cd /usr/local/src
++% gzip -cd < /tmp/ftpmirror-x.y.tar.gz | tar xf -
++
++</pre>
++
++So create a directory named ftpmirror-x.y. Change directory
++and execute configure:<br>
++<i>Notice: If you need define specific perl verions, please set
++perls path for enviroment variable "PERL".</i>
++<pre>
++% cd ftpmirror-x.y
++% ./configure 
++</pre>
++
++<i>Or, when you need specific perl version:</i>
++<pre>
++% cd ftpmirror-x.y
++% env PERL=/usr/local/bin/perl5.005 ./configure 
++</pre>
++
++Execute make:
++
++<pre>
++% make
++</pre>
++
++When finished make with no errors. So install:
++<pre>
++% su
++# make install
++</pre>
++
++In finished this procedure, so installed files are below paths:
++<pre>
++/usr/local/bin/ftpmirror
++/usr/local/bin/rotate
++/usr/local/etc/ftpmirror.cf-sample
++/usr/local/lib/perl5/site_perl/Fan.pm
++/usr/local/lib/perl5/site_perl/Fan/...   (and some dirs)
++/usr/local/lib/perl5/site_perl/auto/Fan/...  (and some dirs) 
++
++* Notice: libraries install directory can changes 
++    with perl's installed settings.
++</pre>
++
++And copying and editing a configuration files, please add
++difinition what you needs.
++<pre>
++# cd /usr/local/etc
++# cp ftpmirror.cf-sample ftpmirror.cf
++# vi ftpmirror.cf
++
++</pre>
++
++<h2><a name=configuration>Configuration</h2>
++
++You can define parameters for <i>ftpmirror</i> with
++the default configuration file,
++package specific configuration file,
++and run-time options (commands arguments).
++
++In addition, configuration files are set /usr/local/etc/ftpmirror.cf
++by defauls, it can change by command argument 
++"--load-config=/hoge/local.cf" if you need.
++And argument "--load-config=+/hogehoge/local.cf" is used, 
++this is append reading after adove defaults reading.
++
++<p>
++Configuration parameters have follwoing types.
++
++<pre>
++Default parametes:
++Configuration files settings. They are written before
++Serverss and Packages parameters. 
++
++Server parameters:
++Difinition of server specific(timeouts, gateways and
++so on..). They are provided at configuration files, 
++with 'server' parameters.
++
++Package parameters:
++Difinition of packages specific(direcotry, transfer 
++modes and so on). They are provided at configuration files, 
++with 'package' parameters.
++
++Option parameters:
++It provide by command args.
++</pre>
++
++Their parameters are settings by adove order(when exists).
++Option parameters are most prefferd.
++<p>
++
++How to settings parameters at configuration files:<br>
++
++That has two syntaxr, 
++
++<pre>
++param-name = value
++or 
++param-name += value 
++
++=  is set param-name by value.
+++= is adding value(strings) for param-name.
++</pre>
++<p>
++How to settings parameters at commands args:<br>
++
++When using by commands args,any parameters must be 
++prepended by "--" in command line options.
++That use --(two minus) before options.
++
++For example, following syntax is same as adove 
++configuration settings.
++
++<pre>
++% ftpmirror --param-name=value ...
++% ftpmirror --param-name+=value ...
++</pre>
++
++<h2><a name=parameters>Parameters</h2>
++
++<p>
++There are many acceptable parameters as follows:
++<ul>
++<li><b>Parameters for system and behavior</b>
++<ul>
++
++<li><a name=todo>todo</a>:(string, default: full-mirror) <br>
++Settings of command behavior. Currently <i>ftpmirror</i>
++supports these behavior.
++<ul>
++<li>scan-remote	: listup remote sides files.
++
++<li>scan-local	: listup local sides files.
++<li>update-master	: update local sides master index.
++<li>synch-remote	: synchronize index files.
++<li>step-mirror	: mirroring as slave mode.
++<li>full-mirror	: execute basic mirroring(default).
++</ul>
++In defaults, it set basic mirroring behavior "full-mirror".
++*-regexp filters are enabled at first, any behavior 
++works with these filters.
++
++<li><a name=veboze>verbose</a>: (boolean, default: no)<br>
++When set yes, transfer logs ouput verbosey. If set yes,
++logs output about non-transfererd/non-modified files.
++
++<li><a name=log-mask>log-mask</a>: (comma separated list,
++default: none)<br>
++Settings about output logs. These difinition separates by 
++perl libraries. For example, 
++	log-mask = Fan=6,Fan::FTP=7
++are set, a output log include filelist of non transfererd/
++non modified, and ftp's verbosey log.
++
++<li><a name=test-mode>test-mode</a> (boolean, default: no)<br>
++
++dry-run. When set yes, only show filelist of transfer targets
++without real transfer.
++</ul>
++
++<li><b>Parameters for FTP session</b>
++<ul>
++
++<li><a name=ftp-server>ftp-server</a>: (string, default: none)<br>
++The server name to connect FTP session. This must be specified
++for mirroring.
++
++<li><a name=ftp-gateway>ftp-gateway</a>: (string, default: none)<br>
++Specify this parameter if you use FTP proxy gateway such as
++<a href=http://www.tis.com/docs/products/fwtk/>
++TIS Internet FireWall ToolKit</a>.
++For example, "ftp-user = anonymous", "ftp-server = ring.etl.go.jp",
++"ftp-gateway = proxy.intec.co.jp" are set, real-connection
++goes to proxy.intec.co.jp, and username is anynymou@ring.etl.go.jp
++(ftp-pass is through simple).
++You may define this with <a name=server>server</a> parameter. 
++
++
++<li><a name=ftp-port>ftp-port</a>: (service, default: ftp)
++ftp port definition. If you need change a port number, please set.
++When nomarlly usage, it is not necessary.
++
++<li><a name=ftp-bindaddr>ftp-bindaddr</a>: (ip address, default: none)
++ftp local sides IP address difinitition. This can set a 
++specific difinition of local ip address. When using multi-homed
++hosts(The hosts have multiple ip addresses), this settings provides
++a clear log files.
++When nomarlly usage, it is not necessary.
++
++<li><a name=ftp-user>ftp-user</a>: (string, default: anonymous)<br>
++Login name for FTP session. If you want to use anonymous FTP,
++please specify "anonymous" as this parameter.
++
++<li><a name=ftp-pass>ftp-pass</a>: (string, default: `whoami`@`hostname`)<br>
++Password for FTP session. 
++
++<li><a name=ftp-group>ftp-group</a>: (string, default: none)<br>
++If you want change group id after logged to the server,
++specify the group name.
++This must be specified with <a href=#ftp-gpass><tt>ftp-gpass</tt></a>.
++
++
++<li><a name=ftp-gpass>ftp-gpass</a>: (string, default: none)<br>
++If you want change group id after logged to the server,
++specify a password to change group.
++This must be specified with <a href=#ftp-group><tt>ftp-group</tt></a>.
++
++<li><a name=ftp-passive>ftp-passive</a>: (boolean, default: no)<br>
++Set this parameter to yes if passive connection(PASV command in FTP)
++is required. This helps you if you use <i>ftpmirror</i> over
++a SYN/ACK style firewall.
++
++<li><a name=ftp-idle>ftp-idle</a>: (numeric, default: 0)<br>
++If this parameter is not zero, <i>ftpmirror</i> tries to set idle timer
++of FTP session to this value.
++FTP server must support SITE IDLE command.
++
++
++<li><a name=ftp-max-idle>ftp-max-idle</a>: (boolean, default: 0)<br>
++If this parameter is not zero, <i>ftpmirror</i> tries to set idle timer
++of FTP session to maximum value.
++FTP server must support SITE IDLE command.
++
++<li><a name=ftp-list-method>ftp-list-method</a>: (LIST or STAT or STAT-A or STAT-A or STAT-AT default: STAT)<br>
++You can specify which of STAT or LIST command should be used to get
++server's directory entries. Since STAT command returns server's
++directory entries over control connection, it is little faster than
++LIST command. Some ftp server software does not returns directory
++entry which is required by <i>ftpmirror</i>, in that case you must
++speficy as <b>ftp-list-method = list</B>.
++
++<li><a name=ftp-timeout>ftp-timeout</a>: (numeric, default: 300)<br>
++
++Timeout of connection. Unit is second. 
++
++<li><a name=ftp-login-retry>ftp-login-retry</a>: (numeric, default: none)<br>
++*This function is not implemented yet.*
++
++<li><a name=ftp-login-delay>ftp-login-delay</a>: (numeric, default: 60)<br>
++
++<li><a namer=ftp-stats>ftp-stats</a>: (boolean, default: no)<br>
++If it set yes, when mirroring is finished, total transaction 
++staistics is shown. It appear "control connection in/out", and
++"data connection in/out" by octet units.
++
++<li><a name=http-proxy>http-Proxy</a>: (string, default: none)
++http-proxy settings when you need accessing ftp server with
++http. But, http cannot get direcroty information, so use 
++ls-LR file, or using slave mode.<br>
++For example, 
++
++<ul>
++ <li> package = FreeBSD
++    <li> ftp-server = ftp.tokyonet.ad.jp
++    <li> http-proxy = proxy.my.company.com
++    <li> remote-directory = /pub/FreeBSD
++    <li> local-directory = ~ftp/pub/FreeBSD
++    <li> lslR-file = /pub/FreeBSD/ls-lR.Z
++</ul>
++Notice: HTTP is usgin per file transfer TCP connection.
++So cause large session logs, and heavy latency. 
++</ul>
++
++<li><b>Parameters for a package</b>
++<ul>
++<li><a name=server>server</a>: (boolean, default none)<br>
++This is used to define FTP server specific parameters.
++After this parameter, any parameter are treated as the server
++specific parameter,
++until package or (next)server parameter will be found.
++Especially, it's reasonable to specify
++</ul>
++
++<li><b>Parameters for a mirroring</b>
++<ul>
++<li><a name=unlink>unlink</a>:(boolean, default: no)<br>
++When set yes, local directory trees are copied to remote hosts.
++For example,
++
++<ul>
++ <li>package = webcopy
++ <li> ftp-server = www.intec.co.jp
++ <li> ftp-user = webadmin
++ <li> ftp-pass = nan-jara-hoi
++ <li> ftp-passive = yes
++ <li> put-mode = yes
++ <li> remote-directory = /usr/local/etc/httpd/htdocs
++ <li> local-directory = ~ikuo/web/htdocs
++
++<ul>
++
++<li><a name=unlink>unlink</a>: (boolean or 'rename' default: yes)<br>
++Set this parameter "yes" or 1 if you want to unlink a file
++which is removed from servers directory.
++You may set this parameter as "rename",
++in this case, <i>ftpmirror</i> renames a file with a trailing Tilda('~').
++
++<li><a name=unlink-limit>unlink-limit</a>: (size value, default: 0)<br>
++** !!! This is not support current version. This is obsolete.**<br>
++If this parameter is defined, <i>ftpmirror</i> will not remove
++large files or large directories.
++This may help you when server side directory hierachy is
++dramatically changed.
++For example, if <tt>unlink-limit</tt> is defined as 30M,
++any file or directory who is larger than 30Mbytes will not
++be removed. You may also specify 500K or 3G as the maximum size.
++When <tt>unlink-limit</tt> is defined as 100 (e.g. no size suffix),
++
++<i>ftpmirror</i> will not remote the directory who has more than
++100 entries.
++
++<li><a name=ftp-force-mtime>ftp-force-mtime</a>:(boolean, default: no)<br>
++ When it set yes, time comparing is using MDTM commands.It set no,
++ MDTM commands does not call using only file transfering.  
++
++<li><a name=ignore-mtime>ignore-mtime</a>: (boolean, default: no)<br>
++<li><a name=check-mtime>check-mtime</a>: (default: 1)<br>
++By default, <i>ftpmirror</i> try to check modified times of local and
++remote files. If this parameter is zero, <i>ftpmirror</i> does NOT
++check modified time.
++In this case, if local and remote files have same size <i>ftpmirror</i>
++
++will only change local file timestamp to match remote one.
++
++<li><a name=temp-directory>temp-directory</a>: (pathname, default: /tmp)<br>
++<i>Ftpmirror</i> stores temporary files to the directory specified by
++this parameter. Currently, ls-lR or dirinfo files may be stored
++in this directory.
++
++<li><a name=lock-directory>lock-directory</a>: (pathname, default: /tmp)<br>
++<i>Ftpmirror</i> use lock mechanism
++to avoid invoking multiple <i>ftpmirror</i>s for a package.
++lock-directory parameter means the directory to create lock file.
++local-db
++<li><a name=create-firectory>create-directory</a> : (boolean, default: yes)
++When local-directory, temp-directory, lock-directory is set, but 
++target directories dont exists, case of set yes to mkdir, set no
++to not and error aborting.
++
++
++<li><a name=remote-directory>remote-directory</a>: (boolean, default: none)<br>
++You must specify the directory on the FTP server where you want to mirror
++as this parameter.
++Any mirror is recursively performed from this directory.
++
++<li><a name=local-directory>local-directory</a>: (pathname, default: none)<br>
++You must set this parameter to the directory in local-side host,
++e.g. the directory paired with
++<a name=remote-directory>remote-directory</a>.
++Next example shows that <i>ftpmirror</i> will mirror
++"/pub/FreeBSD" in the FTP server
++to "/ftp/pub/FreeBSD" in local.
++<pre>
++remote-directory = /pub/FreeBSD
++local-directory = /ftp/pub/FreeBSD</pre>
++If home-directory is defined (or ftp user's home directory exists),
++you can specify as follows:
++
++<pre>
++remote-directory = /pub/FreeBSD
++local-directory = ~/pub/FreeBSD</pre>
++
++<li><a name=master-db-directory>master-db-directory</a>: (pathname, default: none)<br>
++ftpmirror can store localhosts filelist and last mirroring datas,
++if use this features, set master-db-directory and create storing 
++directory.
++
++For example, following esettings will create filelist of ~ftp/pub/FreeBSD
++files. In this case, "n" is index files revision. And cycle a mirroring,
++~ftp/db/FreeBSD/step.m is created too. "m" is step files revisions.
++step.m is diff of index.m => index.m+1.
++<pre>
++	package = FreeBSD
++	 ftp-server = ftp.FreeBSD.ORG
++	 remote-directory = /pub/%s
++	 local-directory = ~ftp/pub/%s
++	 master-db-directory = ~ftp/db/%s
++</pre>
++Addition, when dont use mirroring, master-db-direcoty can manage
++directory tree. Example is below.
++
++<pre>
++	package = original-tools
++	 local-directory = ~ftp/pub/%s
++	 master-db-directory = ~ftp/db/%s
++</pre>
++
++For update database only please execute:
++<pre>
++	% ftpmirror --todo=update-master original-tools
++</pre>
++
++If remote server has a master-db-directory, it can use 
++"slave mode" mirroring. Please set remote-db-directory
++and local-db-cirectory parameters.
++
++<li><a name=remote-db-directory>remote-db-directory</a>: (pathname, default: none)
++<li><a name=local-db-directory>local-db-directory</a>: (pathname, default: none)<br>
++When remote server has a remote-db-directory, it can efficiency mirroring.
++This called "slave mode". "slave mode" can be use setting 
++remote-db-directory and local-db-directory. If you use it, 
++please create directory that local-db-directory specified. 
++A parameters of master-db-directory is must set remote sides
++master-db-direcotry.<br>
++
++These parameters can %s conversion(same local-directry parameters)
++And, local-db-directory supports tilda(~) directory conversion.
++
++When remote-db-directory and local-db-directory set, ftpmirror's
++behavior is below. At first, starts sync master-db-directory, 
++second, start mirroring with db information. In this case, 
++all file informations are provide by db, so without LIST, STAT
++commands.
++
++And, database syncronization is not fully copy, this synthethis
++a old index file and step files. Full copy is only apper at
++two case one is first copy, one of db files are broken. 
++
++For example, using "slave mode" with adove(master-db-directory's
++example) server, sample configuration is below.
++
++<pre>
++
++	package = FreeBSD
++ 	 ftp-server = ftp.master.server.host
++	 remote-directory = /pub/%s
++	 local-directory = ~ftp/pub/%s
++	 remote-db-directory = /db/%s
++	 local-db-directory = ~ftp/db/%s
++</pre>
++
++For advence, you can cumulative mirroring with step files.
++Configuration is same adove, use: 
++<pre>
++	 % ftpmirror --todo=step-mirror FreeBSD
++</pre>
++
++<li><a name=lslR-file>lslR-file</a>: (pathname, default: none)<br>
++You can use ls-lR(or similar) on the FTP server rather than
++directory scan with STAT/LIST. Specify server side filename
++of ls-lR(or similar) as this parameter.
++If <tt>lslR-file</tt> has an extension of .gz or .Z,
++gunzip or uncompress will be automatically invoked.
++For example, if you mirror ftp.freebsd.org:/pub/FreeBSD with ls-lR.gz,
++you may specify as next:
++
++<pre>
++ftp-server = ftp.freebsd.org
++remote-directory = /pub/FreeBSD
++local-directory = ~/pub/FreeBSD
++lslR-file = /pub/FreeBSD/ls-lR.gz</pre>
++
++<li><a name="lslR-copy">lslR-copy</a>: (pathname, default: none)<br>
++When you need archive copying lslR-file on localhost, set this 
++parameter. If you set a relative path, a path leading from 
++local-directory. And, relative path set override-file parameters 
++automatically. So lslR-copy is prevent from overwrite with mirroring.
++This setting is set, when lslR-file is transfered, and chacheing to 
++lslR-copy file, then prevent needless transfer.
++The check of size/last modified are non-transferring with lslR-file.
++<br>
++Addition, when you set this parameters, you can use efficient mirroring
++with ls-lR file without lslR-file parameters.
++
++<li>transfer-file-regexp: (regexp, default: matches all)<br>
++  Regular expressions(perl's regular expression) to match filenames
++  to transfer.
++  <i>Ftpmirror</i> tries to transfer only files on the server
++  which matches to this expression.
++  Any filename on the FTP server is represented as relative path
++  (from remote-directory) beginning with "./".
++  That is, if remote-directory is configured as "/pub/FreeBSD",
++  the file "/pub/FreeBSD/2.1.5-RELEASE/README.TXT" on the server
++  is represented as "./2.1.5-RELEASE/README.TXT".<br>
++
++  <p>
++  Some examples follow:
++  </p><pre>  transfer-file-regexp += !/~$/
++  transfer-file-regexp += !/\/\.in/
++  transfer-file-regexp += !/\/\.nfs/</pre>
++  With this configuration, <i>ftpmirror</i> does NOT transfer files
++  end with "~" and begin with ".in" or ".nfs".
++  <p>
++
++  (Notes: "=" means replacing a parameter value,
++   and "+=" means appending a parameter string)
++  </p><pre>  transfer-file-regexp += /\/bash-/
++  transfer-file-regexp += /\/gcc-/
++  transfer-file-regexp += !</pre>
++
++  With adobe configuration, <i>ftpmirror</i> tries to transfer bash-* and
++  gcc-* files, but not others.
++  The last line in this example means
++  <i>ftpmirror</i> does NOT transfer by default.
++<li>transfer-directory-regexp: (default: matches all)<br>
++  Regular expressions(perl's regular expression) to match directory
++  names to scan in a FTP server.
++  Note that any directory in a FTP server is represented with trailing
++  slash ('/').
++  For example, next shows configuration to avoid <i>ftpmirror</i>
++  NOT to scan(off course, this means NOT to transfer) directories
++  whose names are "lost+found", or directories ended with '~'.
++  <pre>  transfer-directory-regexp += !/\/lost+found\/$/
++  transfer-directory-regexp += !/~\/$/</pre>
++
++<li>override-file-regexp: (default: matches all)<br>
++  Regular expressions(perl's regular expression) to match files
++  you can override in local directories.
++  In actual mirror session,
++  <i>ftpmirror</i> tries to transfer files which match
++  <tt>transfer-file-regexp</tt>,
++  and also match <tt>override-file-regexp</tt>.
++  Any file which does not match <tt>override-file-regexp</tt>
++  will not be modified by <i>ftpmirror</i>.
++  In the next example, <i>ftpmirror</i> tries to transfer bash-* files,
++  but not modified any other files. This is useful when you want
++  to get files from multiple FTP servers
++  to a single local-side directory.
++  <pre>  transfer-file-regexp += /\/bash-/
++  transfer-file-regexp += !
++  override-file-regexp += /\/bash-/
++  override-file-regexp += !</pre>
++
++<li>override-directory-regexp: (default: matches all)<br>
++  Regular expressions(perl's regular expression) to match directories
++  <i>ftpmirror</i> will modify.
++  You can transfer directories from multiple FTP
++  servers to a single local-side directory with this parameter.
++  Following example shows that you can transfer the FreeBSD-nonUS
++  into the FreeBSD directory.
++  <pre>  package = FreeBSD
++   ftp-server = ftp.tokyonet.ad.jp
++   remote-directory = /pub/FreeBSD
++   local-directory = ~/pub/FreeBSD
++   override-directory-regexp += !/\.\/FreeBSD-nonUS\//
++
++  package = FreeBSD-nonUS
++   ftp-server = ftp.waseda.ac.jp
++   remote-directory = /pub/FreeBSD-nonUS
++   local-directory = ~/pub/FreeBSD/FreeBSD-nonUS</pre>
++
++<li>load-local-dirinfo: (default: 0)<br>
++  Set this parameter to 1 if you want to load local ".dirinfo" files.
++  A ".dirinfo" file contains
++  <a href="#dirinfo">directory information</a> described below.
++
++
++<li>store-local-dirinfo: (default: 0)<br>
++  Set this parameter to 1 if you want to generate ".dirinfo" files
++  in local-side directories after each mirror session.
++  A ".dirinfo" file contains
++  <a href="#dirinfo">directory information</a> described below.
++
++<li>load-remote-dirinfo: (default: 0)
++Set this parameter to 1 if you want to load and use directory information stored in the FTP server. Using directory information, you can mirror files without STAT/LIST/SIZE/MDTM, and ftpmirror can check MD5 checksum of files.
++
++<li>override-file-uid: (default: 0)<br>
++  You can specify owner of files/directories in local. Any files
++  and directories which match <tt>override-*-regexp</tt>,
++  will be owned by this user id.
++  If <i>ftpmirror</i> is invoked by non privileged user,
++  this parameter is ignored.
++
++ </li><li>override-file-gid: (default: 0)<br>
++
++  Same as <a href="#override-file-uid"><tt>override-file-uid</tt></a>,
++  but this parameter is for group id.
++  Note that if one of <tt>override-file-uid</tt>
++  and <tt>override-file-gid</tt> is defined,
++  any file which matches <tt>override-*-regexp</tt> (even if it is
++  not transfered) will be modified with chown.
++
++ </li><li>override-file-mode: (default: root -&gt; 0444, other -&gt; 0644)<br>
++
++  You can specify local-side file mode.
++  <i>Ftpmirror</i> applies chmod to any file which matches
++  <tt>override-*-regexp</tt> if this parameter is specified.
++
++ </li><li>override-directory-mode: (default: 0755)<br>
++  Same as <a href="#override-file-mode"><tt>override-file-mode</tt></a>,
++  but this parameter is for directories.
++
++ </li><li>default-file-uid: (default: 0)<br>
++
++  Undef <a href="#override-file-uid"><tt>override-file-uid</tt></a>,
++  and set this parameter to specify default owner of local-side files.
++  <i>Ftpmirror</i> decides file owner in order:
++  <tt>override-file-uid</tt>, owner in FTP server,
++  <tt>default-file-uid</tt>.
++
++ </li><li>default-file-gid: (default: 0)<br>
++
++  Same as <tt>default-file-uid</tt>, but this parameter is for group id.
++
++ </li><li>default-file-mode: (default: root -&gt; 0444, other -&gt; 0644)<br>
++
++  Undef <a href="#override-file-mode"><tt>override-file-mode</tt></a>
++  and you can specify default file mode.
++  <i>Ftpmirror</i> tries to change file mode
++  in order: <tt>override-file-mode</tt>,
++  file mode in FTP server, <tt>default-file-mode</tt>.
++  Note that since file mode is masked with 0777, you can not set
++  setuid/setgid file modes.
++
++ </li><li>default-directory-mode: (default: 0755)<br>
++
++ Same as <a href="#default-file-mode"><tt>default-file-mode</tt></a>,
++ but this parameter is for a directory mode.
++ </li></ul>
++
++ <i>Ftpmirror</i> tries to compare files in local
++ and remote with these entries.
++ For example, <i>ftpmirror</i> compares as:
++ <ol>
++ <li><b>file</b> file-type<br>
++  Are sizes same? and are md5checksums same?
++ <li><b>symlink</b> file-type<br>
++
++  Do they point same file?
++ <li><b>directory</b> file-type<br>
++  Is the begin-time of last update of local directory is before
++  the end-time of last update of remote directory?
++ </ol>
++ Especially, comparing directory update times are effective,
++ if no file is changed in the remote directory, because <i>ftpmirror</i>
++ do nothing about the directory (even directory scan is skipped).
++ <p>
++ <i>Ftpmirror</i> generate ".dirinfo" file
++ if <a href=#store-local-dirinfo><tt>store-local-dirinfo</tt></a> parameter
++ is 1. You can also generate this file with mkdirinfo:
++ <pre>
++
++ # mkdirinfo /ftp/pub/utils</pre>
++
++<h2>Mailing list for <i>ftpmirror</i></h2>
++
++ Technical questions, suggestions, bug reports are welcome.
++ If you are interesting to <i>ftpmirror</i>, there is a mailing-list
++ to discuss about <i>ftpmirror</i>.
++ To subscribe, send a message
++ <pre>
++ subscribe ftpmirror</pre>
++
++ to <a href=mailto:majordomo@ftp.intec.co.jp>
++ majordomo@ftp.intec.co.jp</a>.
++
++<h2>Credits</h2>
++
++ I would like to thank to anyone who helped me by testing,
++ bug-reports, suggestions, sending patches.
++ Especially, members in
++ <a href=http://ring.etl.go.jp/>RingProject</a> helped me by
++ <b>heavy</b> testing <tt>:-)</tt> and many suggestions.
++
++
++<h2>Miscellaneous...</h2>
++
++ Please read COPYRIGHT for copyright notice.
++ Any comments, bug fixes, suggestions are welcome.
++ Please contact to
++ <a href=mailto:ikuo@intec.co.jp><i>Ikuo Nakagawa
++  &lt;ikuo@intec.co.jp&gt;</i></a>.
++
++<hr>
++<i>Last updated: 1997/01/27 by Ikuo Nakagawa</i><br>
++<i>This is community translated file. This is not original document.</i>
++<i>Translated on 2007-07-07 by Fumihito YOSHIDA (hito@kugutsu.org). Thank you.</i>
++</body></html>
++
+diff -urNad ftpmirror-1.96+dfsg~/RELEASE ftpmirror-1.96+dfsg/RELEASE
+--- ftpmirror-1.96+dfsg~/RELEASE	1970-01-01 01:00:00.000000000 +0100
++++ ftpmirror-1.96+dfsg/RELEASE	2007-07-16 03:20:27.995163981 +0200
+@@ -0,0 +1,159 @@
++---- This is translated document for your convinience. ---
++
++Guidance of ftpmirror-1.96
++
++* Introduction
++
++One year or more has passed for the first time the 
++development of ftpmirror-2.0 branch. 
++It is reworking of ftpmirror-1.2 branch from scrach.
++
++Im busy, and doesn't make progress. However, I want 
++to fix the bug, new version of 1.96 is release now.
++
++Some bugs still remains, I will fix them.
++
++* About Changes
++
++Changelog from 1.2k is below (But it is not included always,
++because new version have a lot of changes).
++
++o Mirroring function supports PUT mode.
++  (When it is allowed, execute chmod at remote side)
++
++o Most parts were coding as module. 
++
++o MD5 support is currently wrote by XS, and direct 
++ execution is support now.
++
++o Mirroring function supports http proxy.
++(restriction: this func need dirinfo or ls-lR, and so on..)
++
++o Using AutoSplit. It can efficiency loading.
++
++o New feature (work in progress) : "INDEX mode".
++  It will could usefull mirroring including diff management.
++
++o Directory name conversion support for easy configuration.
++  For example,  ~ftp/pub  and  ~ftp/pub/%s and so on.
++
++o resource checking with getrusage command.
++
++o In FTP mode, login retry  and  reconnect when timed out 
++  is supports now. 
++
++Restriction:
++1.2k's functions of "unlink-limit" and "follow-symlink-regexp" 
++and some functions are not implemented yet. 
++These will come back at future release.
++
++* Bug fix information
++
++Newly version(1.96)'s fixlist is below. I will have corrected them.
++
++o Fix: problem of STAT commands, it with wu-ftpd and so on.
++
++o Fix: mirroring fail when include '_' in owner and group strings.
++
++* About version strings
++
++Currently version is 1.96. I will release incremetal versions
++(1.97, 1.98, 1.99...) in beta-phase, product release is using 2.0.
++But, if heavy bug remains, and/or in features enhancement,
++they have a possibility of branch 1.99 --> 1.991 ;)
++
++* How to install
++
++There is configurable from this version.
++
++Please type:
++
++% ./configure
++
++% make
++
++% su
++
++# make install
++
++so installing /usr/local/bin/ftpmirror and perl library.
++
++perl library is installed for site-addon, for example 
++"/usr/local/lib/perl5/site_perl".
++
++appendix modules are:
++
++Fan.pm
++
++Fan/Attrib.pm
++
++Fan/Cool.pm
++
++Fan/DIR.pm
++
++Fan/FTP.pm
++
++Fan/Farm.pm
++
++Fan/HTTP.pm
++
++Fan/Loader.pm
++
++Fan/MD5.pm
++
++Fan/Param.pm
++
++Fan/Scan.pm
++
++Fan/TCP.pm
++
++Fan/Usage.pm
++
++and their derivation objects.
++
++
++In default, samples configuration file
++
++/usr/local/etc/ftpmirror.cf-sample
++
++is dropped at installation. Please copy this file, 
++and edit for your configuration.
++
++# cd /usr/local/etc
++
++# cp ftpmirror.cf-sample ftpmirror.cf
++
++# vi ftpmirror.cf
++
++This sample is include basic settings, please wrote your 
++archive places and so on. Configuration syntax is wrote
++at README files.
++
++* Copyrights
++
++Omitted in translation, please see "COPYRIGHT" files.
++
++* Special thanks
++
++Thanks for RingProject members, and ftpmirror mailing 
++list members. You are provide very important informations 
++and helpful adivices. Thank you sincerely. 
++
++# Notice: Development will start the most severe part :-p
++# please cooperate further.  > ALL
++
++* epilogue
++
++If you have comments, ideas, bug reports,
++ please send message to ikuo@jp.freebsd.org . 
++
++Dec 27, 1999, Ikuo Nakagawa
++
++---- This is translated document for your convinience. ---
++
++--------------------------------------------------------------------------------
++
++ Translated into English on 2007-07-07 by Fumihito YOSHIDA <hito@kugutsu.org>.
++
++--------------------------------------------------------------------------------
++
--- ftpmirror-1.96+dfsg.orig/debian/patches/03-config-path-fix.dpatch
+++ ftpmirror-1.96+dfsg/debian/patches/03-config-path-fix.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## config-path-fix.dpatch by Dario Minnucci <debian@midworld.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Configuration file path fixes.
+
+@DPATCH@
+diff -urNad ftpmirror-1.96~/Fan/Fan.pm ftpmirror-1.96/Fan/Fan.pm
+--- ftpmirror-1.96~/Fan/Fan.pm	2007-01-30 00:50:54.480051291 +0100
++++ ftpmirror-1.96/Fan/Fan.pm	2007-01-30 00:52:00.848926303 +0100
+@@ -48,7 +48,7 @@
+ 
+ ;# Where configuration files are.
+ BEGIN {
+-	$sysconfdir = "/usr/local/etc";
++	$sysconfdir = "/etc/ftpmirror";
+ }
+ 
+ ;#
--- ftpmirror-1.96+dfsg.orig/debian/patches/02-perl-libs-path-fix.dpatch
+++ ftpmirror-1.96+dfsg/debian/patches/02-perl-libs-path-fix.dpatch
@@ -0,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## perl-libs-path-fix.dpatch by Dario Minnucci <debian@midworld.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Added path to required libraries.
+
+@DPATCH@
+diff -urNad ftpmirror-1.96+dfsg~/ftpmirror ftpmirror-1.96+dfsg/ftpmirror
+--- ftpmirror-1.96+dfsg~/ftpmirror	2007-12-07 04:57:45.369748688 +0100
++++ ftpmirror-1.96+dfsg/ftpmirror	2007-12-07 04:57:45.565759858 +0100
+@@ -31,6 +31,13 @@
+ use strict;
+ use vars qw($VERSION $LOG $program);
+ 
++;#
++;# Added by Dario Minnucci (for debianization in version 1.96-1)
++;#
++;# libs
++use lib ('/usr/lib/ftpmirror');
++use lib ('/usr/share/ftpmirror');
++
+ ;# modules
+ use Fan;
+ 
--- ftpmirror-1.96+dfsg.orig/debian/patches/05-supress-password-output.dpatch
+++ ftpmirror-1.96+dfsg/debian/patches/05-supress-password-output.dpatch
@@ -0,0 +1,27 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## supress-password-output.dpatch by Dario Minnucci <debian@midworld.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Supress password output on program execution for non anonymous logins.
+
+@DPATCH@
+diff -urNad ftpmirror-1.96~/Fan/Fan.pm ftpmirror-1.96/Fan/Fan.pm
+--- ftpmirror-1.96~/Fan/Fan.pm	2007-01-30 04:39:36.767630284 +0100
++++ ftpmirror-1.96/Fan/Fan.pm	2007-01-30 04:44:00.397411909 +0100
+@@ -762,8 +762,14 @@
+ 
+ 		# Show user account.
+ 		$msg = "username = ".$p->ftp_user;
+-		$msg .= '/'.$p->ftp_pass
+-			if $p->ftp_user eq 'ftp' || $p->ftp_user eq 'anonymous';
++
++		#
++		# Supress password output on program execution for non anonymous logins
++		#
++		#if ($p->ftp_user eq 'ftp' || $p->ftp_user eq 'anonymous') {
++		if ($p->ftp_user eq 'anonymous') {
++			$msg .= '/'.$p->ftp_pass;
++		}
+ 		plog(5, $msg."\n");
+ 
+ # WE USE DELAYED LOGIN, THAT IS, WE WILL LOGIN WHEN FIRST COMMAND
--- ftpmirror-1.96+dfsg.orig/debian/patches/04-config-sample-packages.dpatch
+++ ftpmirror-1.96+dfsg/debian/patches/04-config-sample-packages.dpatch
@@ -0,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## config-sample-packages.dpatch by Dario Minnucci <debian@midworld.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Sample of ftpmirror generic package added for testing porpouses.
+
+@DPATCH@
+diff -urNad ftpmirror-1.96~/ftpmirror.cf-sample ftpmirror-1.96/ftpmirror.cf-sample
+--- ftpmirror-1.96~/ftpmirror.cf-sample	2007-01-29 05:06:07.685787461 +0100
++++ ftpmirror-1.96/ftpmirror.cf-sample	2007-01-29 05:06:22.253565055 +0100
+@@ -102,3 +102,28 @@
+  ftp-server = ftp.intec.co.jp
+  remote-db-directory = /db/%s
+  local-db-directory = ~ftp/db/%s
++
++#
++# Sample configuration for 'upstream' package
++# (added on 2007-01-29 for Debian packaging)
++#
++# Original upstream available at:
++# ftp://ftp.intec.co.jp/pub/utils/ftpmirror
++#
++# In order to test this package you need to create
++# /tmp/upstream directory manually and issue the
++# following command: 
++# 
++#    /usr/bin/ftpmirror upstream
++# 
++package = upstream
++ ftp-server = ftp.intec.co.jp
++ ftp-user = anonymous
++ ftp-pass = mail@example.com
++ ftp-stats = yes
++# put-mode = yes
++# remote-db-directory = /tmp/ftpmirror-remote/%s
++# local-db-directory = /tmp/ftpmirror-local/%s
++ remote-directory = /pub/utils/ftpmirror
++ local-directory = /tmp/upstream
++
--- ftpmirror-1.96+dfsg.orig/debian/patches/07-deal_with_unresolved_UIDs_and_GIDs.dpatch
+++ ftpmirror-1.96+dfsg/debian/patches/07-deal_with_unresolved_UIDs_and_GIDs.dpatch
@@ -0,0 +1,28 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 07-deal_with_unresolved_UIDs_and_GIDs.dpatch by Dario Minnucci (midget) <debian@midworld.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Deal with unresolved UIDs and GIDs in the FTP session (see BTS #504482)
+
+@DPATCH@
+diff -urNad ftpmirror-1.96+dfsg~/Fan/Attrib/Attrib.pm ftpmirror-1.96+dfsg/Fan/Attrib/Attrib.pm
+--- ftpmirror-1.96+dfsg~/Fan/Attrib/Attrib.pm	1999-10-28 12:32:18.000000000 +0200
++++ ftpmirror-1.96+dfsg/Fan/Attrib/Attrib.pm	2008-11-10 13:57:17.560730075 +0100
+@@ -366,7 +366,7 @@
+ 	# check owner
+ 	if (!defined($y->{y_owner})) {
+ 		debug(8, " check ok: no owner\n");
+-	} elsif ($y->{y_owner} =~ /^[-_\w]+$/) {
++	} elsif ($y->{y_owner} =~ /^[()?-_\w]+$/) {
+ 		debug(8, " check ok: owner = $y->{y_owner}\n");
+ 	} else {
+ 		carp("$y has wrong owner: $y->{y_owner}");
+@@ -376,7 +376,7 @@
+ 	# check group
+ 	if (!defined($y->{y_group})) {
+ 		debug(8, " check ok: no group\n");
+-	} elsif ($y->{y_group} =~ /^[-_\w]+$/) {
++	} elsif ($y->{y_owner} =~ /^[()?-_\w]+$/) {
+ 		debug(8, " check ok: group = $y->{y_group}\n");
+ 	} else {
+ 		carp("$y has wrong group: $y->{y_group}");
--- ftpmirror-1.96+dfsg.orig/debian/patches/00list
+++ ftpmirror-1.96+dfsg/debian/patches/00list
@@ -0,0 +1,7 @@
+01-perl-path-fix.dpatch
+02-perl-libs-path-fix.dpatch
+03-config-path-fix.dpatch
+##04-config-sample-packages.dpatch
+05-supress-password-output.dpatch
+06-translated-files.dpatch
+07-deal_with_unresolved_UIDs_and_GIDs.dpatch
