Package: debmirror Version: 20051209 Severity: wishlist Tags: patch Having an debian mirror on an protected ftp server (I need to login with user and password), here is a patch which implements this.
Greetings, peter Baumann *** ftp-password.patch diff --git a/debmirror b/debmirror index bd51e6a..a3abf6a 100755 --- a/debmirror +++ b/debmirror @@ -53,7 +53,8 @@ sub usage { warn <<EOF; Usage: $0 [--debug] [--progress] [--verbose] [--source|--nosource] [--md5sums] [--passive] [--host=remotehost] - [--user=remoteusername] [--method=ftp|hftp|http|rsync] + [--user=remoteusername] [--passwd=remoteuserpassword ] + [--method=ftp|hftp|http|rsync] [--timeout=seconds] [--root=directory] [--dist=foo[,bar,..] ...] [--section=foo[,bar,..] ...] [--arch=foo[,bar,..] ...] [--skippackages] [--getcontents] @@ -123,6 +124,11 @@ you are strongly encouraged to find a cl Specify the remote user name to use to log to the remote host. Helpful when dealing with brain damaged proxy servers. Defaults to anonymous. +=item --passwd=remoteuserpassword + +Specify the remote user password to use to log into the remote ftp host. +It is used with --user and defaults to [EMAIL PROTECTED] + =item --method=ftp|hftp|http|rsync -e Specify the method to download files. Currently, supported methods are @@ -369,6 +375,7 @@ our $post_cleanup=0; our $do_source=1; our $host="ftp.debian.org"; our $user="anonymous"; +our $passwd="anonymous@"; our $remoteroot="/debian"; our $download_method="ftp"; our $timeout=300; @@ -408,6 +415,7 @@ GetOptions('debug' => \$debug, 'passive!' => \$passive, 'host|h=s' => \$host, 'user|u=s' => \$user, + 'passwd=s' => \$passwd, 'root|r=s' => \$remoteroot, 'dist|d=s' => [EMAIL PROTECTED], 'section|s=s' => [EMAIL PROTECTED], @@ -451,7 +459,7 @@ my $mirrordir=shift or usage("mirrordir # Display configuration. $|=1 if $debug; -say("Mirroring to $mirrordir from $download_method://$user:$host/$remoteroot/"); +say("Mirroring to $mirrordir from $download_method://[EMAIL PROTECTED]/$remoteroot/"); say("Arches: ".join(",", @arches)); say("Dists: ".join(",", @dists)); say("Sections: ".join(",", @sections)); @@ -535,7 +543,7 @@ sub init_connection { /^ftp$/ && do { $ftp=Net::FTP->new($host, %opts) or die "[EMAIL PROTECTED]"; - $ftp->login($user) or die "login failed"; # anonymous + $ftp->login($user, $passwd) or die "login failed"; $ftp->binary or die "could not set binary mode"; $ftp->cwd($remoteroot) or die "cwd to $remoteroot failed"; $ftp->hash(*STDOUT,102400) if $progress; -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-1-k7 Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1) Versions of packages debmirror depends on: ii bzip2 1.0.3-2 high-quality block-sorting file co ii libcompress-zlib-perl 1.41-1 Perl module for creation and manip ii liblockfile-simple-perl 0.2.5-7 Simple advisory file locking ii libwww-perl 5.805-1 WWW client/server library for Perl ii perl [libdigest-md5-perl] 5.8.8-3 Larry Wall's Practical Extraction ii perl-modules [libnet-perl] 5.8.8-3 Core Perl modules ii rsync 2.6.7-1 fast remote file copy program (lik Versions of packages debmirror recommends: ii gnupg 1.4.2.2-1 GNU privacy guard - a free PGP rep -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]