debian/0000755000000000000000000000000012231214103007153 5ustar debian/watch0000644000000000000000000000016111715043222010212 0ustar version=3 opts=pasv,dversionmangle=s/\+dfsg// \ ftp://ftp.sai.msu.su/pub/unix/FTP/mirror/ftpmirror-(.*)\.tar\.gz debian/cron.weekly0000644000000000000000000000164511715043222011354 0ustar #!/bin/sh # # File: /etc/cron.weekly/ftpmirror # Description: Cron script to save a log of ftpmirror tasks. # Author: Dario Minnucci # 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 debian/README.source0000644000000000000000000000047211715043222011345 0ustar 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 Fri, 11 Sep 2009 06:34:29 +0200 debian/links0000644000000000000000000000005211715043222010223 0ustar etc/ftpmirror usr/share/ftpmirror/config debian/list.monthly0000644000000000000000000000060611715043222011554 0ustar # # 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. # debian/list.weekly0000644000000000000000000000060311715043222011357 0ustar # # 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. # debian/ftpmirror.80000644000000000000000000001227311715043222011305 0ustar .\" 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 insert n+1 empty lines .\" for manpage-specific macros, see man(8) .TH "FTPMIRROR" "8" "June 1, 2007" "Dario Minnucci " "" .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\fP and .\" \fI\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 . 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 .PP This manual page was written by Dario Minnucci , for the Debian project (but may be used by others). debian/ftpmirror.cf0000644000000000000000000000711311715043222011523 0ustar # 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 debian/rules0000755000000000000000000000166611715044706010264 0ustar #!/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. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ override_dh_auto_clean: dh_auto_clean override_dh_auto_configure: LDFLAGS="-Wl,-z,defs" \ ./configure \ --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=$(CURDIR)/debian/ftpmirror/usr \ --sbindir=$(CURDIR)/debian/ftpmirror/usr/sbin \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --sysconfdir=/etc/ftpmirror \ override_dh_auto_install: override_dh_installchangelogs: dh_installchangelogs RELEASE override_dh_perl: dh_perl usr/lib/ftpmirror debian/NEWS.Debian0000644000000000000000000000146611715043222011052 0ustar 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 Sat, 20 Jan 2007 17:58:00 +0100 debian/install0000644000000000000000000000151011715043222010551 0ustar #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 debian/README.Debian0000644000000000000000000000101211715043222011216 0ustar 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 , Fri, 07 Dec 2007 05:48:16 +0100 debian/doc-base0000644000000000000000000000043711715043222010567 0ustar 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 debian/list.daily0000644000000000000000000000060011715043222011156 0ustar # # 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. # debian/copyright0000644000000000000000000000554011715046434011132 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: ftpmirror Upstream-Contact: Ikuo Nakagawa Source: ftp://ftp.intec.co.jp/pub/utils/ftpmirror/ Files: * Copyright: 1995-1999, Ikuo Nakagawa 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 1998, takeshi 1999-2003, Takao KAWAMURA 2006, Matej Vela 2007-2012, Dario Minnucci 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. debian/docs0000644000000000000000000000016211715043222010035 0ustar README README.html README.jis RELEASE RELEASE.jis ##debian/NEWS.Debian debian/README.Debian debian/ftpmirror.html debian/cron.daily0000644000000000000000000000164111715043222011152 0ustar #!/bin/sh # # File: /etc/cron.daily/ftpmirror # Description: Cron script to save a log of ftpmirror tasks. # Author: Dario Minnucci # 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 debian/source/0000755000000000000000000000000011715043222010463 5ustar debian/source/format0000644000000000000000000000001411715043222011671 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000011715043222010612 5ustar debian/patches/05-supress-password-output.diff0000755000000000000000000000170211715043222016573 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## supress-password-output.dpatch by Dario Minnucci ## ## 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 debian/patches/01-perl-path-fix.diff0000755000000000000000000000152411715043222014347 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## perl-path-fix.dpatch by Dario Minnucci ## ## 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. debian/patches/03-config-path-fix.diff0000755000000000000000000000106511715043222014654 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## config-path-fix.dpatch by Dario Minnucci ## ## 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"; } ;# debian/patches/07-deal_with_unresolved_UIDs_and_GIDs.diff0000755000000000000000000000221411715043222020454 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 07-deal_with_unresolved_UIDs_and_GIDs.dpatch by Dario Minnucci (midget) ## ## 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}"); debian/patches/series0000644000000000000000000000030211715043222012022 0ustar 01-perl-path-fix.diff 02-perl-libs-path-fix.diff 03-config-path-fix.diff 05-supress-password-output.diff 06-translated-files.diff 07-deal_with_unresolved_UIDs_and_GIDs.diff 00-fix-makefile.diff debian/patches/02-perl-libs-path-fix.diff0000755000000000000000000000126711715043222015303 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## perl-libs-path-fix.dpatch by Dario Minnucci ## ## 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; debian/patches/00-fix-makefile.diff0000644000000000000000000000175411715043222014231 0ustar # # Description: Fix Makefile.in file # Author: Dario Minnucci # Index: ftpmirror/Makefile.in =================================================================== --- ftpmirror.orig/Makefile.in 2011-02-11 00:05:14.396096153 +0100 +++ ftpmirror/Makefile.in 2011-02-11 00:06:43.546785817 +0100 @@ -1,18 +1,18 @@ -prefix= @prefix@ +prefix= @prefix@ exec_prefix= @exec_prefix@ -sysconfdir= @sysconfdir@ +sysconfdir= @sysconfdir@ -BINDIR= @bindir@ -LIBDIR= @libdir@ -SYSCONFDIR= @sysconfdir@ +BINDIR= @bindir@ +LIBDIR= @libdir@ +SYSCONFDIR= @sysconfdir@ -PERL= @PERL@ +PERL= @PERL@ -INSTALL= @INSTALL@ +INSTALL= @INSTALL@ INSTALL_DATA= @INSTALL_DATA@ INSTALL_PROGRAM= @INSTALL_PROGRAM@ -SUBDIR= Fan +SUBDIR= Fan all:: @@ -23,7 +23,7 @@ rm -f *.old *.bak *.core Makefile # install:: ${BINDIR}/farm -install:: ${BINDIR}/rotate +# install:: ${BINDIR}/rotate install:: ${BINDIR}/ftpmirror install:: ${SYSCONFDIR}/ftpmirror.cf-sample debian/patches/06-translated-files.diff0000755000000000000000000017514211715043222015145 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 06-translated-files.dpatch by Dario Minnucci (midget) ## ## 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 . @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 . + +-------------------------------------------------------------------------------- + + 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 . + +-------------------------------------------------------------------------------- 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 @@ + +ftpmirror - mirroring directory hierarchy with FTP + +

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 on 2007-07-07 by Fumihito YOSHIDA (hito@kugutsu.org). Thank you. + + 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 . + +-------------------------------------------------------------------------------- + debian/compat0000644000000000000000000000000211715043222010361 0ustar 7 debian/control0000644000000000000000000000140211715043222010563 0ustar Source: ftpmirror Section: net Priority: optional Maintainer: Dario Minnucci Build-Depends: debhelper (>= 7.0.50~), autotools-dev, perl (>= 5.10.0) Standards-Version: 3.9.2 Homepage: ftp://ftp.intec.co.jp/pub/utils/ftpmirror Vcs-Git: git://git.debian.org/collab-maint/ftpmirror.git Vcs-Browser: http://git.debian.org/?p=collab-maint/ftpmirror.git Package: ftpmirror Architecture: any Recommends: cron Depends: perl (>= 5.10.0), ${misc:Depends}, ${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. debian/ftpmirror.html0000644000000000000000000000514011715043222012075 0ustar Content-type: text/html Man page of FTPMIRROR

          FTPMIRROR

          Section: Maintenance Commands (8)
          Updated: January 29, 2007
          Index
           

          NAME

          ftpmirror - Mirroring directory hierarchy using FTP protocol  

          SYNOPSIS

          ftpmirror [package]  

          DESCRIPTION

          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.  

          OPTIONS

          Traditionally ftpmirror mirroring operation was MASTER->SLAVE but 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)
          SLAVE->MASTER --> put-mode = yes  

          EXAMPLES

          ftpmirror 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):

          mkdir -p /tmp/upstream
          /usr/bin/ftpmirror upstream

          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)  

          SEE ALSO

          For other supported configuration options see /etc/ftpmirror/ftpmirror.cf where you will find commented examples.  

          AUTHOR

          ftpmirror was originally written by Ikuo Nakagawa <ikuo@intec.co.jp>

          This manual page was written by Dario Minnucci <debian@midworld.net>, for the Debian project (but may be used by others).


           

          Index

          NAME
          SYNOPSIS
          DESCRIPTION
          OPTIONS
          EXAMPLES
          SEE ALSO
          AUTHOR

          This document was created by man2html, using the manual pages.
          Time: 20:15:17 GMT, January 29, 2007 debian/changelog0000644000000000000000000002240712231214103011032 0ustar ftpmirror (1.96+dfsg-13build1) trusty; urgency=low * Rebuild for Perl 5.18. -- Colin Watson Mon, 21 Oct 2013 13:04:19 +0100 ftpmirror (1.96+dfsg-13) unstable; urgency=low * debian/copyright: Minor fixes * The XS modules shipped with this package are installed into /usr/lib/ftpmirror, but dh_perl doesn't find them without hinting, and therefore doesn't create the right perlapi-* dependency. Thanks: Patrice Pillot for reporting and Niko Tyni for the patch. (Closes: #659240) -- Dario Minnucci Fri, 10 Feb 2012 00:05:40 +0100 ftpmirror (1.96+dfsg-12) unstable; urgency=low * Fixes for FTBFS. (Closes: #643123) * debian/control: - Bumped Standards-Version to 3.9.2 (no changes) * debian/copyright: Fix for out-of-date-copyright-format-uri and necessary changes for compatiblity with DEP-5 revision 174 -- Dario Minnucci Tue, 27 Sep 2011 09:18:38 +0200 ftpmirror (1.96+dfsg-11) unstable; urgency=low * Hosted under git.debian.org (collab-main branch): - http://git.debian.org/?p=collab-maint/ftpmirror.git * debian/control: - Maintainer: Email address updated. - Added Vcs-Git and Vcs-Browser fields - Updated debhelper dependency to (>= 7.0.50~) - Added missing dependency on ${misc:Depends} - Bump Standards-Version to 3.9.1: - Drop dependency on dpatch - Switch to dpkg-source 3.0 (quilt) format * debian/rules: - Replaced by the 'magic' debian/rules file. * debian/patches: - Added 00-fix-makefile.diff to fix Makefile.in * debian/watch: - Upstream URL changed. (Closes:#566500) * debian/copyright: - Email address updated. -- Dario Minnucci Fri, 11 Feb 2011 00:41:14 +0100 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) 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 for the patch. -- Dario Minnucci (midget) 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) Sun, 20 Jul 2008 13:52:16 +0200 ftpmirror (1.96+dfsg-7) unstable; urgency=low * Revert accidental removal. (Re: #490982) -- Dario Minnucci (midget) 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) 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) 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 (Closes: #419150) * debian/rules: Changes to get rid of lintian warning. -- Dario Minnucci (midget) 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 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 Tue, 6 Feb 2007 13:15:05 +0100 ftpmirror (1.96-1) unstable; urgency=low * New maintainer's email address * 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 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 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 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 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 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 Thu, 14 Feb 2002 12:55:09 +0900 ftpmirror (1.2l-5) unstable; urgency=high * Applied a y2k patch written by Fumitoshi UKAI . * Added doc-base support. -- Takao KAWAMURA Tue, 21 Dec 1999 12:33:38 +0900 ftpmirror (1.2l-4) unstable; urgency=low * FHS-compliant -- Takao KAWAMURA 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 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 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 Tue, 8 Nov 1998 12:04:59 +0900 ftpmirror (1.2k-2) unstable; urgency=low * fix debian control file. -- takeshi Mon, 4 Aug 1997 16:33:59 +0900 ftpmirror (1.2k-1) unstable; urgency=low * Initial Release. -- takeshi Thu, 24 Jul 1997 22:26:19 +0900 debian/dirs0000644000000000000000000000007611715043222010052 0ustar etc/ftpmirror usr/sbin usr/share/ftpmirror var/log/ftpmirror debian/cron.monthly0000644000000000000000000000165111715043222011543 0ustar #!/bin/sh # # File: /etc/cron.monthly/ftpmirror # Description: Cron script to save a log of ftpmirror tasks. # Author: Dario Minnucci # 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 debian/manpages0000644000000000000000000000001711715043222010677 0ustar debian/*.[1-8]