debian/0000755000000000000000000000000012250570771007174 5ustar debian/copyright0000644000000000000000000001053012225623011011112 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: wput Upstream-Contact: Hagen Fritsch , Source: http://wput.sourceforge.net X-Upstream-Vcs: git://wput.git.sourceforge.net/gitroot/wput/wput X-Upstream-Bugs: https://sourceforge.net/tracker/?group_id=141519&atid=749613 X-Upstream-Comment: Unresponsive upstream. Forwarded bugs to sourceforge are automatically closed and no actions are being taken to fix or improve the software. Practically a stale project. Files: * Copyright: 2010 Hagen Fritsch , License: GPL-2+ Files: src/getop/* Copyright: 1987-1998 Free Software Foundation, Inc. License: LGPL-2+ Files: debian/* Copyright: 2004-2006 Khalid El Fathi 2008 Cyril Brulebois 2009-2012 Jari Aalto 2013 Stephen Kitt License: GPL-2+ Files: src/msvcpp/strptime.c Copyright: 1994 Powerdog Industries License: BSD /* * Copyright (c) 1994 Powerdog Industries. All rights reserved. * * Redistribution and use in source and binary forms, without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, 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. * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgement: * This product includes software developed by Powerdog Industries. * 4. The name of Powerdog Industries may not be used to endorse or * promote products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY POWERDOG INDUSTRIES ``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 POWERDOG INDUSTRIES 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. */ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". License: LGPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. . You should have received a copy of the GNU General Public License along with this program; if not, see . . On Debian systems, the complete text of the GNU Library General Public License can be found in "/usr/share/common-licenses/LGPL-2". debian/watch0000644000000000000000000000005612225622156010223 0ustar version=3 http://sf.net/wput/wput-(\d.+)\.tgz debian/clean0000644000000000000000000000011312225622156010171 0ustar config.cache config.log wput wput.hardened src/*.o .pc/.version doc/*.1.gz debian/man/0000755000000000000000000000000012225622156007744 5ustar debian/man/original/0000755000000000000000000000000012225622156011550 5ustar debian/man/original/wput.10000644000000000000000000003315712225622156012642 0ustar .TH "wput" "1" "0.6.2" "Hagen Fritsch" "Internet Applications - FTP" .SH "NAME" wput \- A wget\-like ftp\-uploader .SH "SYNOPSIS" wput [\fIoption\fR]... [\fI\s-1file\s0\fR]... [\fI\s-1URL\s0\fR]... .SH "DESCRIPTION" Wput is a free utility that is able to upload files to a ftp-server. .PP Wput is non\-interactive and background-capable. It can upload files or whole directories and is meant to be a robust client even for unstable connections and will therefore retry to upload a file, if the connection broke. .PP Wput supports resuming, so it automatically continues uploading from the point where the previous upload stopped, meaning that you can kill Wput anytime and it will (if the remote ftp\-server supports this, being most likely the case) finish the partial uploaded file. .PP Wput supports connections through proxies, allowing you to use it in an environment that can access the internet only via a proxy or to provide anonymity by hiding your ip\-address to the server. For SOCKSv5\-proxies Wput supports also listening mode, allowing you to use port-mode ftp through a proxy (useful if the remote ftp is behind a firewall or a gateway). .PP Wput supports timestamping, so it will (in the ideal case and if timestamping is enabled) only upload files, that are newer than the remote-file. .PP The upload-rate of Wput can be restricted, so that Wput won't eat all available bandwidth. .SH "URL\-Input\-Handling" URLs are recognized by the ftp://\-prefix .PP Wput first reads the URLs from command-line, and associates the first file with the first URL, the second file with the second URL etc. It then transmits the file/URL combinations that are already complete. Afterwards, Wput uses the \-\-input\-file (if any) and reads the URLs using the same sheme as above. In situations where more URLs than files are specified, Wput tries to guess the local filename from the URL. In case there are more files that URLs remaining, Wput uses the last known URL for each of the files. .PP So you can specify e.g. one URL and read all filenames from a file. Or use \fIwput *.txt ftp://host\fR, to transfer all *.txt-files. See \fIdoc/USAGE.examples\fR for further examples. .PP To be on the safe side, it is recommended to supply the files before the URLs. .SH "Guessing Local File" If Wput has an URL without a corresponding filename, Wput tries to guess the local file's location. e.g. using wput ftp://host/directory/path/file, Wput will look out for /directory/path/file. If not found, Wput looks for ./directory/path/file, ./path/file and ./file. .SH "OPTIONS" .Sh "Basic Startup Options" .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Display the version of wput. .IP "\fB\-h\fR" 4 .IX Item "-h" .PD 0 .IP "\fB\-\-help\fR" 4 .IX Item "--help" .PD Print a help screen, with a short description of wput's command-line options. .IP "\fB\-b\fR" 4 .IX Item "-b" .PD 0 .IP "\fB\-\-background\fR" 4 .IX Item "--background" .PD Go to background immediately after startup. If no output file is given, wput will redirect its output to "./wputlog" .Sh "Logging and Input File Options" .IX Subsection "Logging and Input File Options" .IP "\fB\-o\fR \fIlogfile\fR" 4 .IX Item "-o logfile" .PD 0 .IP "\fB\-\-output\-file=\fR\fIlogfile\fR" 4 .IX Item "--output-file=logfile" .PD Log all messages to \fIlogfile\fR. .IP "\fB\-a\fR \fIlogfile\fR" 4 .IX Item "-a logfile" .PD 0 .IP "\fB\-\-append\-output=\fR\fIlogfile\fR" 4 .IX Item "--append-output=logfile" .PD Append all logged messages to \fIlogfile\fR. .IP "\fB\-q\fR" 4 .IX Item "-q" .PD 0 .IP "\fB\-\-quiet\fR" 4 .IX Item "--quiet" .PD Turn off Wput's output. .IP "\fB\-v\fR" 4 .IX Item "-v" .PD 0 .IP "\fB\-\-verbose\fR" 4 .IX Item "--verbose" .PD Turn on verbose output. This gives some more information about what Wput does. If you specify this flag twice, you get debug output. .IP "\fB\-nv\fR" 4 .IX Item "-nv" .PD 0 .IP "\fB\-\-less\-verbose\fR" 4 .IX Item "--less-verbose" .PD Be less verbose. That means reducing Wput's output to a minimun. Specifiing this flag more often is equal to the --quiet flag. Some people also like combining the -v and -nv flags, being quite senseless. .IP "\fB\-i\fR \fIfile\fR" 4 .IX Item "-i file" .PD 0 .IP "\fB\-\-input\-file=\fR\fIfile\fR" 4 .IX Item "--input-file=file" .PD Reads URLs and filenames from \fIfile\fR. If there are URLs on the command-line too, these will be retrieved first, unless sorting is enabled. See also the URL-Input-Handling section. .PD If \fIfile\fR is \-, the URLs will be read from stdin. .PD If you want to pipe the contents of the file that shall be uploaded to stdin, this cannot be done (yet). But you can use the --input-pipe flag and read the contents a) from a named pipe -I "cat named.pipe; echo > /dev/null" or b) directly from the command, that outputs the data. (See --input-pipe) .PD Do \fBnot\fR do things like \fIfind | wput ftp://host/ \-i \-\fR! Wput would upload all files from the current directory (since the first output of find will be '.') and afterwards each file again (since find postes its name to Wput. And further problematic is that Wput will upload each directory that is given by find and since find itself recurses all directories, the files would be uploaded three times (or even more often for further subdirectories). Use \fIwput ftp://host/\fR to upload everything from the local directory. Or use \fIfind ! \-type d | wput ftp://host/ \-i \-\fR to tell find, not to output directories. .IP "\fB\-s\fR" 4 .IX Item "-s" .PD 0 .IP "\fB\-\-sort\fR" 4 .IX Item "--sort" .PD If sorting is enabled Wput first reads all URLs from any input-devices available and will sort them before transmitting each file. .PD The sorting order is: ip/hostname, port, username, password, directory, filename. Sorting requires a bit more memory since all data needs to be hold there. .IP "\fB\-\-basename=\fR\fIpath\fR" 4 .IX Item "--basename=path" .PD This option causes Wput to snip \fIpath\fR from all input\-files when they are connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create ftp://host//usr/share/doc.tgz, whereas specifing /usr/share/ as basename will result in ftp://host/doc.tgz being created. .IP "\fB\-I\fR \fIcommand\fR" 4 .IX Item "-I command" .PD 0 .IP "\fB\-\-input\-pipe=\fR\fIcommand\fR" 4 .IX Item "--input-pipe=command" .PD If no file/directory can be "guessed" (see "Guessing Local File") from the URL, the output of \fIcommand\fB is taken as file-input. command is invoked as follows: .PP \& command ftp "username" "ip/hostname" port "remote_directory" "remote_filename" .IP "" 4 .PD The hostname is only supplied if the ip cannot be resolved. If you do not want these parameters to confuse the programm from which you read the contents, use something like '-I "cat file; echo > /dev/null"' so that these parameters are passed to echo and to /dev/null afterwards. Since the progressbar is not capable of handling unknown filesizes, the filesize is set to 1 GiB. Therefore the ETA shows a wrong value. .IP "\fB\-R\fR" 4 .IX Item "-R" .PD 0 .IP "\fB\-\-remove\-source\-files\fR" 4 .IX Item "--remove-source-files" .PD Unlinks/deletes files that have been successfully transmitted. .Sh "Upload Options" .IX Subsection "Upload Options" .IP "\fB\-\-bind\-address=\fR\fI\s-1ADDRESS\s0\fR" 4 .IX Item "--bind-address=ADDRESS" When making client \s-1TCP/IP\s0 connections, \f(CW\*(C`bind()\*(C'\fR to \fI\s-1ADDRESS\s0\fR on the local machine. \fI\s-1ADDRESS\s0\fR may be specified as a hostname or \s-1IP\s0 address. This option can be useful if your machine is bound to multiple IPs. .IP "\fB\-t\fR \fInumber\fR" 4 .IX Item "-t number" .PD 0 .IP "\fB\-\-tries=\fR\fInumber\fR" 4 .IX Item "--tries=number" .PD Set number of retries to \fInumber\fR. Specify -1 for infinite retrying, which is default, too. .IP "\fB\-nc\fR" 4 .IX Item "-nc" .PD 0 .IP "\fB\-\-dont\-continue\fR" 4 .IX Item "--dont-continue" .PD If this flag is specified, resuming will be turned off, meaning that a remote file being smaller than the local one will be overwritten. To skip this file, you have to enable \-\-skip\-existing. .PD See also \fIdoc/USAGE.resumehandling\fR .IP "\fB\-u\fR" 4 .IX Item "-u" .PD 0 .IP "\fB\-\-reupload\fR" 4 .IX Item "--reupload" .PD If this flag is specified, a remote file having the same size as the local one is to be uploaded. Skipping is default. .IP "\fB\-\-skip\-larger\fR" 4 .IX Item "--skip-larger" .PD If this flag is specified, a remote file being larger than the local one will be skipped. Default is reuploading it. .IP "\fB\-\-skip\-existing\fR" 4 .IX Item "--skip-existing" .PD If this flag is specified, the upload of a file will be skipped if the remote file already exists. .IP "\fB\-N\fR" 4 .IX Item "-N" .PD 0 .IP "\fB\-\-timestamping\fR" 4 .IX Item "--timestamping" .PD If timestamping is enabled, Wput will retrieve a directory list and parse it to determine the remote file\-date. If the local file is newer than the remote one (there is a default allowed timevariance of 5 seconds, which can be adjusted in the \fIwputrc\fR-file) it is uploaded, otherwise skipped. .PD The local date is dermined by the mtime (time of last modification), using the current time-zone. This should be equal to the output of ls \-l. .PD Since you usually do not want to resume existing files, you should employ the \-\-reupload \-\-dont-continue flags as well. .IP "\fB\-l\fR \fIRATE\fR" 4 .IX Item "-l RATE" .PD 0 .IP "\fB\-\-limit\-rate=\fR\fIRATE\fR" 4 .IX Item "--limit-rate=RATE" If you don't want Wput to eat up all available bandwidth, specify this flag. \fIRATE\fR is a numeric value. The units 'K' (for KiB) and 'M' (for MiB) are understood. .PD The upload rate is limited on average, meaning that if you limit the rate to 10K and Wput was just able to send with 5K for the first seconds, it will send (if possible) afterwards more than 10K until the average rate of 10K is fulfilled. .IP "\fB\-\-no\-directories\fR" 4 .IX Item "--no-directories" .PD If Wput is unable to CWD into a directory, it will try to create it. If this is not the desired behaviour specify this flag to force Wput not to create any directories. .IP "\fB\-Y\fR \fIMODE\fR" 4 .IX Item "-Y MODE" .PD 0 .IP "\fB\-\-proxy=\fR\fIMODE\fR" 4 .IX Item "--proxy=MODE" .PD MODE can be either \fIhttp\fR for http-based proxies (such as SQUID), \fIsocks\fR for SOCKSv5 proxies or \fIoff\fR to disable the proxy. .IP "\fB\-\-proxy-user=\fR\fINAME\fR" 4 .IX Item "--proxy-user=NAME" If the proxy\-server requires authentication, use \fINAME\fR as user-name. You need to specify \-\-proxy-pass too. These information can also be stored in the wputrc\-file. .IP "\fB\-\-proxy-pass=\fR\fIPASS\fR" 4 .IX Item "--proxy-pass=PASS" Specifies the password to use for the proxy. .Sh "FTP Options" .IX Subsection "FTP Options" .IP "\fB\-p\fR" 4 .IX Item "-p" .PD 0 .IP "\fB\-\-port\-mode\fR" 4 .IX Item "--port-mode" Per default, Wput uses passive mode ftp, which works well for most configurations. If passive mode fails, Wput automatically falls back to port mode. .PD If you want Wput to start using port mode ftp, specify this flag. .IP "\fB\-A\fR" 4 .IX Item "-A" .PD 0 .IP "\fB\-\-ascii\fR" 4 .IX Item "--ascii" Wput automatically determines which transfer\-format to use, by looking at the file-extensions. Certain files are recognized as ASCII. These are: txt, c, java, cpp, sh, f, f90, f77, f95, bas", pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas .PD Specifying this flag forces Wput to use ASCII mode file transfers. .IP "\fB\-B\fR" 4 .IX Item "-B" .PD 0 .IP "\fB\-\-binary\fR" 4 .IX Item "--binary" .PD Specifying this flag forces Wput to use BINARY mode file transfers. .IP "\fB\-m\fR" 4 .IX Item "-m" .PD 0 .IP "\fB\-\-chmod\fR" 4 .IX Item "--chmod" .PD This will change the access mode of the transferred files. The format is the three-digit octal unix mode, e.g. 644 means rw-r--r--. .IP "\fB\-\-force-tls\fR" 4 .IX Item "--force-tls" If this flag is specified and Wput is linked with the OpenSSL-library, the flag enforces the usage of TLS: If no TLS\-connection can be established the process will cancel and not try to go on with an unencrypted connection. .SH DIAGNOSTICS Normally, the exit status is 0 if either everything went fine or there was nothing to do. If some files were skipped during the upload (due to timestamping or resume\-rules) the exit status is set to 1. If some files failed to be transmitted due to an remote error, exit status is 2. If some files failed and some others were skipped, exit status is 3. For general problems like failure of some system-functions the exit status is 4. .SH BUGS .IX Header "BUGS" .PD You are welcome to send bug reports and suggestions about Wput through the Sourceforge Bugtracking System: http://sourceforge.net/tracker/?group_id=141519 .PP 0 Please send all available information that might concern this bug (e.g. Operating System and what can be done to reproduce the error). Supply also the debug-output (but remove confidential data if any), which helps a lot analysing the problem. If you use a wputrc file, it might also be useful to provide the relevant parts of it. .PP 0 If there is a crash due to a segfault or similar, try to run it in a debugger, e.g. \f(CW\*(C`gdb `which wput` core\*(C'\fR and type \f(CW\*(C`where\*(C'\fR to get the backtrace. It would also be great help if you could recompile wput with memory-debugging support (make clean; make memdbg; [make install]) and use this debug-dump. .SH "SEE ALSO" .IX Header "SEE ALSO" Many options can be set in a wputrc file. For its documentation consult the sample file provided by Wput. .PD 0 There are some USAGE.* files in the doc/ directory of Wput. These contain further information and samples on how to use Wput. .SH "AUTHOR" .IX Header "AUTHOR" Wput is written by Hagen Fritsch debian/man/original/wdel.10000644000000000000000000000434112225622156012567 0ustar .TH "wdel" "1" "0.6.2" "Hagen Fritsch, Jan Larres" "Internet Applications - FTP" .SH "NAME" wdel \- A wget\-like program for deleting files on ftp servers .SH "SYNOPSIS" wdel [\fIoption\fR]... [\fI\s-1URL\s0\fR [\fI\s-1file\s0\fR]...]... .SH "DESCRIPTION" Wdel is a free utility that is able to delete files on an ftp server. .PP Wdel is non\-interactive and background-capable. It can delete files or whole directories and is meant to be a robust client even for unstable connections and will therefore retry to delete a file, if the connection broke. .PP Wdel supports connections through proxies, allowing you to use it in an environment that can access the internet only via a proxy or to provide anonymity by hiding your ip\-address to the server. For SOCKSv5\-proxies Wdel supports also listening mode, allowing you to use port-mode ftp through a proxy (useful if the remote ftp is behind a firewall or a gateway). .SH "URL\-Input\-Handling" URLs are recognized by the ftp://\-prefix. .PP Wdel first reads the URLs from the command line, and associates every file with the last URL until a new URL is found (note that this is different from wput). Then, it reads the \-\-input\-file (if any) and parses the URLs in the same way. So you can specify e.g. one URL and read all filenames from a file. .PP If there are no explicit filenames given for a singe URL, then the last part of the URL is taken to be the file/directory to be deleted. If there are filenames, then the last part of the URL is considered to be the directory where these files reside in. Slashes at the end of the URL or the filename (in case it is a directory to be deleted) are ignored. .SH "OPTIONS" There are no special options introduced by Wdel. All of Wput’s options may be supplied, although some will not be of any effect because they do not apply for the process of deleting files. Please see wput(1) for a description of the options. .SH "SEE ALSO" .IX Header "SEE ALSO" Many options can be set in a wputrc file. For its documentation consult the sample file provided by Wput. .PP wput(1) describes all setable options. Not all apply for wdel too though. .SH "AUTHOR" .IX Header "AUTHOR" Wdel is written by Hagen Fritsch and Jan Larres debian/man/diff.sh0000644000000000000000000000006012225622156011204 0ustar #!/bin/sh diff -u original/wput.1 debian/wput.1 debian/man/wput.10000644000000000000000000003317312225622156011034 0ustar .TH "wput" "1" "0.6.2" "Hagen Fritsch" "Internet Applications - FTP" .SH "NAME" wput \- A wget\-like ftp\-uploader .SH "SYNOPSIS" wput [\fIoption\fR]... [\fI\s-1file\s0\fR]... [\fI\s-1URL\s0\fR]... .SH "DESCRIPTION" Wput is a free utility that is able to upload files to a ftp-server. .PP Wput is non\-interactive and background-capable. It can upload files or whole directories and is meant to be a robust client even for unstable connections and will therefore retry to upload a file, if the connection broke. .PP Wput supports resuming, so it automatically continues uploading from the point where the previous upload stopped, meaning that you can kill Wput anytime and it will (if the remote ftp\-server supports this, being most likely the case) finish the partial uploaded file. .PP Wput supports connections through proxies, allowing you to use it in an environment that can access the internet only via a proxy or to provide anonymity by hiding your ip\-address to the server. For SOCKSv5\-proxies Wput supports also listening mode, allowing you to use port-mode ftp through a proxy (useful if the remote ftp is behind a firewall or a gateway). .PP Wput supports timestamping, so it will (in the ideal case and if timestamping is enabled) only upload files, that are newer than the remote-file. .PP The upload-rate of Wput can be restricted, so that Wput won't eat all available bandwidth. .SH "URL\-Input\-Handling" URLs are recognized by the ftp://\-prefix .PP Wput first reads the URLs from command-line, and associates the first file with the first URL, the second file with the second URL etc. It then transmits the file/URL combinations that are already complete. Afterwards, Wput uses the \-\-input\-file (if any) and reads the URLs using the same sheme as above. In situations where more URLs than files are specified, Wput tries to guess the local filename from the URL. In case there are more files that URLs remaining, Wput uses the last known URL for each of the files. .PP So you can specify e.g. one URL and read all filenames from a file. Or use \fIwput *.txt ftp://host\fR, to transfer all *.txt-files. See \fIdoc/USAGE.examples\fR for further examples. .PP To be on the safe side, it is recommended to supply the files before the URLs. .SH "Guessing Local File" If Wput has an URL without a corresponding filename, Wput tries to guess the local file's location. e.g. using wput ftp://host/directory/path/file, Wput will look out for /directory/path/file. If not found, Wput looks for ./directory/path/file, ./path/file and ./file. .SH "OPTIONS" .Sh "Basic Startup Options" .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Display the version of wput. .IP "\fB\-h\fR" 4 .IX Item "-h" .PD 0 .IP "\fB\-\-help\fR" 4 .IX Item "--help" .PD Print a help screen, with a short description of wput's command-line options. .IP "\fB\-b\fR" 4 .IX Item "-b" .PD 0 .IP "\fB\-\-background\fR" 4 .IX Item "--background" .PD Go to background immediately after startup. If no output file is given, wput will redirect its output to "./wputlog" .Sh "Logging and Input File Options" .IX Subsection "Logging and Input File Options" .IP "\fB\-o\fR \fIlogfile\fR" 4 .IX Item "-o logfile" .PD 0 .IP "\fB\-\-output\-file=\fR\fIlogfile\fR" 4 .IX Item "--output-file=logfile" .PD Log all messages to \fIlogfile\fR. .IP "\fB\-a\fR \fIlogfile\fR" 4 .IX Item "-a logfile" .PD 0 .IP "\fB\-\-append\-output=\fR\fIlogfile\fR" 4 .IX Item "--append-output=logfile" .PD Append all logged messages to \fIlogfile\fR. .IP "\fB\-q\fR" 4 .IX Item "-q" .PD 0 .IP "\fB\-\-quiet\fR" 4 .IX Item "--quiet" .PD Turn off Wput's output. .IP "\fB\-v\fR" 4 .IX Item "-v" .PD 0 .IP "\fB\-\-verbose\fR" 4 .IX Item "--verbose" .PD Turn on verbose output. This gives some more information about what Wput does. If you specify this flag twice, you get debug output. .IP "\fB\-nv\fR" 4 .IX Item "-nv" .PD 0 .IP "\fB\-\-less\-verbose\fR" 4 .IX Item "--less-verbose" .PD Be less verbose. That means reducing Wput's output to a minimun. Specifiing this flag more often is equal to the \-\-quiet flag. Some people also like combining the \-v and \-nv flags, being quite senseless. .IP "\fB\-i\fR \fIfile\fR" 4 .IX Item "-i file" .PD 0 .IP "\fB\-\-input\-file=\fR\fIfile\fR" 4 .IX Item "--input-file=file" .PD Reads URLs and filenames from \fIfile\fR. If there are URLs on the command-line too, these will be retrieved first, unless sorting is enabled. See also the URL-Input-Handling section. .PD If \fIfile\fR is \-, the URLs will be read from stdin. .PD If you want to pipe the contents of the file that shall be uploaded to stdin, this cannot be done (yet). But you can use the \-\-input\-pipe flag and read the contents a) from a named pipe \-I "cat named.pipe; echo > /dev/null" or b) directly from the command, that outputs the data. (See \-\-input\-pipe) .PD Do \fBnot\fR do things like \fIfind | wput ftp://host/ \-i \-\fR! Wput would upload all files from the current directory (since the first output of find will be '.') and afterwards each file again (since find postes its name to Wput. And further problematic is that Wput will upload each directory that is given by find and since find itself recurses all directories, the files would be uploaded three times (or even more often for further subdirectories). Use \fIwput ftp://host/\fR to upload everything from the local directory. Or use \fIfind ! \-type d | wput ftp://host/ \-i \-\fR to tell find, not to output directories. .IP "\fB\-s\fR" 4 .IX Item "-s" .PD 0 .IP "\fB\-\-sort\fR" 4 .IX Item "--sort" .PD If sorting is enabled Wput first reads all URLs from any input-devices available and will sort them before transmitting each file. .PD The sorting order is: ip/hostname, port, username, password, directory, filename. Sorting requires a bit more memory since all data needs to be hold there. .IP "\fB\-\-basename=\fR\fIpath\fR" 4 .IX Item "--basename=path" .PD This option causes Wput to snip \fIpath\fR from all input\-files when they are connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create ftp://host//usr/share/doc.tgz, whereas specifing /usr/share/ as basename will result in ftp://host/doc.tgz being created. .IP "\fB\-I\fR \fIcommand\fR" 4 .IX Item "-I command" .PD 0 .IP "\fB\-\-input\-pipe=\fR\fIcommand\fR" 4 .IX Item "--input-pipe=command" .PD If no file/directory can be "guessed" (see "Guessing Local File") from the URL, the output of \fIcommand\fB is taken as file-input. command is invoked as follows: .PP \& command ftp "username" "ip/hostname" port "remote_directory" "remote_filename" .IP "" 4 .PD The hostname is only supplied if the ip cannot be resolved. If you do not want these parameters to confuse the programm from which you read the contents, use something like '\-I "cat file; echo > /dev/null"' so that these parameters are passed to echo and to /dev/null afterwards. Since the progressbar is not capable of handling unknown filesizes, the filesize is set to 1 GiB. Therefore the ETA shows a wrong value. .IP "\fB\-R\fR" 4 .IX Item "-R" .PD 0 .IP "\fB\-\-remove\-source\-files\fR" 4 .IX Item "--remove-source-files" .PD Unlinks/deletes files that have been successfully transmitted. .Sh "Upload Options" .IX Subsection "Upload Options" .IP "\fB\-\-bind\-address=\fR\fI\s-1ADDRESS\s0\fR" 4 .IX Item "--bind-address=ADDRESS" When making client \s-1TCP/IP\s0 connections, \f(CW\*(C`bind()\*(C'\fR to \fI\s-1ADDRESS\s0\fR on the local machine. \fI\s-1ADDRESS\s0\fR may be specified as a hostname or \s-1IP\s0 address. This option can be useful if your machine is bound to multiple IPs. .IP "\fB\-t\fR \fInumber\fR" 4 .IX Item "-t number" .PD 0 .IP "\fB\-\-tries=\fR\fInumber\fR" 4 .IX Item "--tries=number" .PD Set number of retries to \fInumber\fR. Specify \-1 for infinite retrying, which is default, too. .IP "\fB\-nc\fR" 4 .IX Item "-nc" .PD 0 .IP "\fB\-\-dont\-continue\fR" 4 .IX Item "--dont-continue" .PD If this flag is specified, resuming will be turned off, meaning that a remote file being smaller than the local one will be overwritten. To skip this file, you have to enable \-\-skip\-existing. .PD See also \fIdoc/USAGE.resumehandling\fR .IP "\fB\-u\fR" 4 .IX Item "-u" .PD 0 .IP "\fB\-\-reupload\fR" 4 .IX Item "--reupload" .PD If this flag is specified, a remote file having the same size as the local one is to be uploaded. Skipping is default. .IP "\fB\-\-skip\-larger\fR" 4 .IX Item "--skip-larger" .PD If this flag is specified, a remote file being larger than the local one will be skipped. Default is reuploading it. .IP "\fB\-\-skip\-existing\fR" 4 .IX Item "--skip-existing" .PD If this flag is specified, the upload of a file will be skipped if the remote file already exists. .IP "\fB\-N\fR" 4 .IX Item "-N" .PD 0 .IP "\fB\-\-timestamping\fR" 4 .IX Item "--timestamping" .PD If timestamping is enabled, Wput will retrieve a directory list and parse it to determine the remote file\-date. If the local file is newer than the remote one (there is a default allowed timevariance of 5 seconds, which can be adjusted in the \fIwputrc\fR-file) it is uploaded, otherwise skipped. .PD The local date is dermined by the mtime (time of last modification), using the current time-zone. This should be equal to the output of ls \-l. .PD Since you usually do not want to resume existing files, you should employ the \-\-reupload \-\-dont-continue flags as well. .IP "\fB\-l\fR \fIRATE\fR" 4 .IX Item "-l RATE" .PD 0 .IP "\fB\-\-limit\-rate=\fR\fIRATE\fR" 4 .IX Item "--limit-rate=RATE" If you don't want Wput to eat up all available bandwidth, specify this flag. \fIRATE\fR is a numeric value. The units 'K' (for KiB) and 'M' (for MiB) are understood. .PD The upload rate is limited on average, meaning that if you limit the rate to 10K and Wput was just able to send with 5K for the first seconds, it will send (if possible) afterwards more than 10K until the average rate of 10K is fulfilled. .IP "\fB\-\-no\-directories\fR" 4 .IX Item "--no-directories" .PD If Wput is unable to CWD into a directory, it will try to create it. If this is not the desired behaviour specify this flag to force Wput not to create any directories. .IP "\fB\-Y\fR \fIMODE\fR" 4 .IX Item "-Y MODE" .PD 0 .IP "\fB\-\-proxy=\fR\fIMODE\fR" 4 .IX Item "--proxy=MODE" .PD MODE can be either \fIhttp\fR for http-based proxies (such as SQUID), \fIsocks\fR for SOCKSv5 proxies or \fIoff\fR to disable the proxy. .IP "\fB\-\-proxy-user=\fR\fINAME\fR" 4 .IX Item "--proxy-user=NAME" If the proxy\-server requires authentication, use \fINAME\fR as user-name. You need to specify \-\-proxy-pass too. These information can also be stored in the wputrc\-file. .IP "\fB\-\-proxy-pass=\fR\fIPASS\fR" 4 .IX Item "--proxy-pass=PASS" Specifies the password to use for the proxy. .Sh "FTP Options" .IX Subsection "FTP Options" .IP "\fB\-p\fR" 4 .IX Item "-p" .PD 0 .IP "\fB\-\-port\-mode\fR" 4 .IX Item "--port-mode" Per default, Wput uses passive mode ftp, which works well for most configurations. If passive mode fails, Wput automatically falls back to port mode. .PD If you want Wput to start using port mode ftp, specify this flag. .IP "\fB\-A\fR" 4 .IX Item "-A" .PD 0 .IP "\fB\-\-ascii\fR" 4 .IX Item "--ascii" Wput automatically determines which transfer\-format to use, by looking at the file-extensions. Certain files are recognized as ASCII. These are: txt, c, java, cpp, sh, f, f90, f77, f95, bas", pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas .PD Specifying this flag forces Wput to use ASCII mode file transfers. .IP "\fB\-B\fR" 4 .IX Item "-B" .PD 0 .IP "\fB\-\-binary\fR" 4 .IX Item "--binary" .PD Specifying this flag forces Wput to use BINARY mode file transfers. .IP "\fB\-m\fR" 4 .IX Item "-m" .PD 0 .IP "\fB\-\-chmod\fR" 4 .IX Item "--chmod" .PD This will change the access mode of the transferred files. The format is the three-digit octal unix mode, e.g. 644 means rw-r--r--. .IP "\fB\-\-force-tls\fR" 4 .IX Item "--force-tls" If this flag is specified and Wput is linked with the OpenSSL-library, the flag enforces the usage of TLS: If no TLS\-connection can be established the process will cancel and not try to go on with an unencrypted connection. .SH DIAGNOSTICS Normally, the exit status is 0 if either everything went fine or there was nothing to do. If some files were skipped during the upload (due to timestamping or resume\-rules) the exit status is set to 1. If some files failed to be transmitted due to an remote error, exit status is 2. If some files failed and some others were skipped, exit status is 3. For general problems like failure of some system-functions the exit status is 4. .SH BUGS .IX Header "BUGS" .PD You are welcome to send bug reports and suggestions about Wput through the Sourceforge Bugtracking System: http://sourceforge.net/tracker/?group_id=141519 .PP 0 Please send all available information that might concern this bug (e.g. Operating System and what can be done to reproduce the error). Supply also the debug-output (but remove confidential data if any), which helps a lot analysing the problem. If you use a wputrc file, it might also be useful to provide the relevant parts of it. .PP 0 If there is a crash due to a segfault or similar, try to run it in a debugger, e.g. \f(CW\*(C`gdb `which wput` core\*(C'\fR and type \f(CW\*(C`where\*(C'\fR to get the backtrace. It would also be great help if you could recompile wput with memory-debugging support (make clean; make memdbg; [make install]) and use this debug-dump. .SH "SEE ALSO" .IX Header "SEE ALSO" Many options can be set in a wputrc file. For its documentation consult the sample file provided by Wput. .PD 0 There are some USAGE.* files in the doc/ directory of Wput. These contain further information and samples on how to use Wput. .SH "AUTHOR" .IX Header "AUTHOR" Wput is written by Hagen Fritsch debian/man/debian/0000755000000000000000000000000012225622156011166 5ustar debian/man/debian/wput.10000644000000000000000000003317312225622156012256 0ustar .TH "wput" "1" "0.6.2" "Hagen Fritsch" "Internet Applications - FTP" .SH "NAME" wput \- A wget\-like ftp\-uploader .SH "SYNOPSIS" wput [\fIoption\fR]... [\fI\s-1file\s0\fR]... [\fI\s-1URL\s0\fR]... .SH "DESCRIPTION" Wput is a free utility that is able to upload files to a ftp-server. .PP Wput is non\-interactive and background-capable. It can upload files or whole directories and is meant to be a robust client even for unstable connections and will therefore retry to upload a file, if the connection broke. .PP Wput supports resuming, so it automatically continues uploading from the point where the previous upload stopped, meaning that you can kill Wput anytime and it will (if the remote ftp\-server supports this, being most likely the case) finish the partial uploaded file. .PP Wput supports connections through proxies, allowing you to use it in an environment that can access the internet only via a proxy or to provide anonymity by hiding your ip\-address to the server. For SOCKSv5\-proxies Wput supports also listening mode, allowing you to use port-mode ftp through a proxy (useful if the remote ftp is behind a firewall or a gateway). .PP Wput supports timestamping, so it will (in the ideal case and if timestamping is enabled) only upload files, that are newer than the remote-file. .PP The upload-rate of Wput can be restricted, so that Wput won't eat all available bandwidth. .SH "URL\-Input\-Handling" URLs are recognized by the ftp://\-prefix .PP Wput first reads the URLs from command-line, and associates the first file with the first URL, the second file with the second URL etc. It then transmits the file/URL combinations that are already complete. Afterwards, Wput uses the \-\-input\-file (if any) and reads the URLs using the same sheme as above. In situations where more URLs than files are specified, Wput tries to guess the local filename from the URL. In case there are more files that URLs remaining, Wput uses the last known URL for each of the files. .PP So you can specify e.g. one URL and read all filenames from a file. Or use \fIwput *.txt ftp://host\fR, to transfer all *.txt-files. See \fIdoc/USAGE.examples\fR for further examples. .PP To be on the safe side, it is recommended to supply the files before the URLs. .SH "Guessing Local File" If Wput has an URL without a corresponding filename, Wput tries to guess the local file's location. e.g. using wput ftp://host/directory/path/file, Wput will look out for /directory/path/file. If not found, Wput looks for ./directory/path/file, ./path/file and ./file. .SH "OPTIONS" .Sh "Basic Startup Options" .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 .IP "\fB\-\-version\fR" 4 .IX Item "--version" .PD Display the version of wput. .IP "\fB\-h\fR" 4 .IX Item "-h" .PD 0 .IP "\fB\-\-help\fR" 4 .IX Item "--help" .PD Print a help screen, with a short description of wput's command-line options. .IP "\fB\-b\fR" 4 .IX Item "-b" .PD 0 .IP "\fB\-\-background\fR" 4 .IX Item "--background" .PD Go to background immediately after startup. If no output file is given, wput will redirect its output to "./wputlog" .Sh "Logging and Input File Options" .IX Subsection "Logging and Input File Options" .IP "\fB\-o\fR \fIlogfile\fR" 4 .IX Item "-o logfile" .PD 0 .IP "\fB\-\-output\-file=\fR\fIlogfile\fR" 4 .IX Item "--output-file=logfile" .PD Log all messages to \fIlogfile\fR. .IP "\fB\-a\fR \fIlogfile\fR" 4 .IX Item "-a logfile" .PD 0 .IP "\fB\-\-append\-output=\fR\fIlogfile\fR" 4 .IX Item "--append-output=logfile" .PD Append all logged messages to \fIlogfile\fR. .IP "\fB\-q\fR" 4 .IX Item "-q" .PD 0 .IP "\fB\-\-quiet\fR" 4 .IX Item "--quiet" .PD Turn off Wput's output. .IP "\fB\-v\fR" 4 .IX Item "-v" .PD 0 .IP "\fB\-\-verbose\fR" 4 .IX Item "--verbose" .PD Turn on verbose output. This gives some more information about what Wput does. If you specify this flag twice, you get debug output. .IP "\fB\-nv\fR" 4 .IX Item "-nv" .PD 0 .IP "\fB\-\-less\-verbose\fR" 4 .IX Item "--less-verbose" .PD Be less verbose. That means reducing Wput's output to a minimun. Specifiing this flag more often is equal to the \-\-quiet flag. Some people also like combining the \-v and \-nv flags, being quite senseless. .IP "\fB\-i\fR \fIfile\fR" 4 .IX Item "-i file" .PD 0 .IP "\fB\-\-input\-file=\fR\fIfile\fR" 4 .IX Item "--input-file=file" .PD Reads URLs and filenames from \fIfile\fR. If there are URLs on the command-line too, these will be retrieved first, unless sorting is enabled. See also the URL-Input-Handling section. .PD If \fIfile\fR is \-, the URLs will be read from stdin. .PD If you want to pipe the contents of the file that shall be uploaded to stdin, this cannot be done (yet). But you can use the \-\-input\-pipe flag and read the contents a) from a named pipe \-I "cat named.pipe; echo > /dev/null" or b) directly from the command, that outputs the data. (See \-\-input\-pipe) .PD Do \fBnot\fR do things like \fIfind | wput ftp://host/ \-i \-\fR! Wput would upload all files from the current directory (since the first output of find will be '.') and afterwards each file again (since find postes its name to Wput. And further problematic is that Wput will upload each directory that is given by find and since find itself recurses all directories, the files would be uploaded three times (or even more often for further subdirectories). Use \fIwput ftp://host/\fR to upload everything from the local directory. Or use \fIfind ! \-type d | wput ftp://host/ \-i \-\fR to tell find, not to output directories. .IP "\fB\-s\fR" 4 .IX Item "-s" .PD 0 .IP "\fB\-\-sort\fR" 4 .IX Item "--sort" .PD If sorting is enabled Wput first reads all URLs from any input-devices available and will sort them before transmitting each file. .PD The sorting order is: ip/hostname, port, username, password, directory, filename. Sorting requires a bit more memory since all data needs to be hold there. .IP "\fB\-\-basename=\fR\fIpath\fR" 4 .IX Item "--basename=path" .PD This option causes Wput to snip \fIpath\fR from all input\-files when they are connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create ftp://host//usr/share/doc.tgz, whereas specifing /usr/share/ as basename will result in ftp://host/doc.tgz being created. .IP "\fB\-I\fR \fIcommand\fR" 4 .IX Item "-I command" .PD 0 .IP "\fB\-\-input\-pipe=\fR\fIcommand\fR" 4 .IX Item "--input-pipe=command" .PD If no file/directory can be "guessed" (see "Guessing Local File") from the URL, the output of \fIcommand\fB is taken as file-input. command is invoked as follows: .PP \& command ftp "username" "ip/hostname" port "remote_directory" "remote_filename" .IP "" 4 .PD The hostname is only supplied if the ip cannot be resolved. If you do not want these parameters to confuse the programm from which you read the contents, use something like '\-I "cat file; echo > /dev/null"' so that these parameters are passed to echo and to /dev/null afterwards. Since the progressbar is not capable of handling unknown filesizes, the filesize is set to 1 GiB. Therefore the ETA shows a wrong value. .IP "\fB\-R\fR" 4 .IX Item "-R" .PD 0 .IP "\fB\-\-remove\-source\-files\fR" 4 .IX Item "--remove-source-files" .PD Unlinks/deletes files that have been successfully transmitted. .Sh "Upload Options" .IX Subsection "Upload Options" .IP "\fB\-\-bind\-address=\fR\fI\s-1ADDRESS\s0\fR" 4 .IX Item "--bind-address=ADDRESS" When making client \s-1TCP/IP\s0 connections, \f(CW\*(C`bind()\*(C'\fR to \fI\s-1ADDRESS\s0\fR on the local machine. \fI\s-1ADDRESS\s0\fR may be specified as a hostname or \s-1IP\s0 address. This option can be useful if your machine is bound to multiple IPs. .IP "\fB\-t\fR \fInumber\fR" 4 .IX Item "-t number" .PD 0 .IP "\fB\-\-tries=\fR\fInumber\fR" 4 .IX Item "--tries=number" .PD Set number of retries to \fInumber\fR. Specify \-1 for infinite retrying, which is default, too. .IP "\fB\-nc\fR" 4 .IX Item "-nc" .PD 0 .IP "\fB\-\-dont\-continue\fR" 4 .IX Item "--dont-continue" .PD If this flag is specified, resuming will be turned off, meaning that a remote file being smaller than the local one will be overwritten. To skip this file, you have to enable \-\-skip\-existing. .PD See also \fIdoc/USAGE.resumehandling\fR .IP "\fB\-u\fR" 4 .IX Item "-u" .PD 0 .IP "\fB\-\-reupload\fR" 4 .IX Item "--reupload" .PD If this flag is specified, a remote file having the same size as the local one is to be uploaded. Skipping is default. .IP "\fB\-\-skip\-larger\fR" 4 .IX Item "--skip-larger" .PD If this flag is specified, a remote file being larger than the local one will be skipped. Default is reuploading it. .IP "\fB\-\-skip\-existing\fR" 4 .IX Item "--skip-existing" .PD If this flag is specified, the upload of a file will be skipped if the remote file already exists. .IP "\fB\-N\fR" 4 .IX Item "-N" .PD 0 .IP "\fB\-\-timestamping\fR" 4 .IX Item "--timestamping" .PD If timestamping is enabled, Wput will retrieve a directory list and parse it to determine the remote file\-date. If the local file is newer than the remote one (there is a default allowed timevariance of 5 seconds, which can be adjusted in the \fIwputrc\fR-file) it is uploaded, otherwise skipped. .PD The local date is dermined by the mtime (time of last modification), using the current time-zone. This should be equal to the output of ls \-l. .PD Since you usually do not want to resume existing files, you should employ the \-\-reupload \-\-dont-continue flags as well. .IP "\fB\-l\fR \fIRATE\fR" 4 .IX Item "-l RATE" .PD 0 .IP "\fB\-\-limit\-rate=\fR\fIRATE\fR" 4 .IX Item "--limit-rate=RATE" If you don't want Wput to eat up all available bandwidth, specify this flag. \fIRATE\fR is a numeric value. The units 'K' (for KiB) and 'M' (for MiB) are understood. .PD The upload rate is limited on average, meaning that if you limit the rate to 10K and Wput was just able to send with 5K for the first seconds, it will send (if possible) afterwards more than 10K until the average rate of 10K is fulfilled. .IP "\fB\-\-no\-directories\fR" 4 .IX Item "--no-directories" .PD If Wput is unable to CWD into a directory, it will try to create it. If this is not the desired behaviour specify this flag to force Wput not to create any directories. .IP "\fB\-Y\fR \fIMODE\fR" 4 .IX Item "-Y MODE" .PD 0 .IP "\fB\-\-proxy=\fR\fIMODE\fR" 4 .IX Item "--proxy=MODE" .PD MODE can be either \fIhttp\fR for http-based proxies (such as SQUID), \fIsocks\fR for SOCKSv5 proxies or \fIoff\fR to disable the proxy. .IP "\fB\-\-proxy-user=\fR\fINAME\fR" 4 .IX Item "--proxy-user=NAME" If the proxy\-server requires authentication, use \fINAME\fR as user-name. You need to specify \-\-proxy-pass too. These information can also be stored in the wputrc\-file. .IP "\fB\-\-proxy-pass=\fR\fIPASS\fR" 4 .IX Item "--proxy-pass=PASS" Specifies the password to use for the proxy. .Sh "FTP Options" .IX Subsection "FTP Options" .IP "\fB\-p\fR" 4 .IX Item "-p" .PD 0 .IP "\fB\-\-port\-mode\fR" 4 .IX Item "--port-mode" Per default, Wput uses passive mode ftp, which works well for most configurations. If passive mode fails, Wput automatically falls back to port mode. .PD If you want Wput to start using port mode ftp, specify this flag. .IP "\fB\-A\fR" 4 .IX Item "-A" .PD 0 .IP "\fB\-\-ascii\fR" 4 .IX Item "--ascii" Wput automatically determines which transfer\-format to use, by looking at the file-extensions. Certain files are recognized as ASCII. These are: txt, c, java, cpp, sh, f, f90, f77, f95, bas", pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas .PD Specifying this flag forces Wput to use ASCII mode file transfers. .IP "\fB\-B\fR" 4 .IX Item "-B" .PD 0 .IP "\fB\-\-binary\fR" 4 .IX Item "--binary" .PD Specifying this flag forces Wput to use BINARY mode file transfers. .IP "\fB\-m\fR" 4 .IX Item "-m" .PD 0 .IP "\fB\-\-chmod\fR" 4 .IX Item "--chmod" .PD This will change the access mode of the transferred files. The format is the three-digit octal unix mode, e.g. 644 means rw-r--r--. .IP "\fB\-\-force-tls\fR" 4 .IX Item "--force-tls" If this flag is specified and Wput is linked with the OpenSSL-library, the flag enforces the usage of TLS: If no TLS\-connection can be established the process will cancel and not try to go on with an unencrypted connection. .SH DIAGNOSTICS Normally, the exit status is 0 if either everything went fine or there was nothing to do. If some files were skipped during the upload (due to timestamping or resume\-rules) the exit status is set to 1. If some files failed to be transmitted due to an remote error, exit status is 2. If some files failed and some others were skipped, exit status is 3. For general problems like failure of some system-functions the exit status is 4. .SH BUGS .IX Header "BUGS" .PD You are welcome to send bug reports and suggestions about Wput through the Sourceforge Bugtracking System: http://sourceforge.net/tracker/?group_id=141519 .PP 0 Please send all available information that might concern this bug (e.g. Operating System and what can be done to reproduce the error). Supply also the debug-output (but remove confidential data if any), which helps a lot analysing the problem. If you use a wputrc file, it might also be useful to provide the relevant parts of it. .PP 0 If there is a crash due to a segfault or similar, try to run it in a debugger, e.g. \f(CW\*(C`gdb `which wput` core\*(C'\fR and type \f(CW\*(C`where\*(C'\fR to get the backtrace. It would also be great help if you could recompile wput with memory-debugging support (make clean; make memdbg; [make install]) and use this debug-dump. .SH "SEE ALSO" .IX Header "SEE ALSO" Many options can be set in a wputrc file. For its documentation consult the sample file provided by Wput. .PD 0 There are some USAGE.* files in the doc/ directory of Wput. These contain further information and samples on how to use Wput. .SH "AUTHOR" .IX Header "AUTHOR" Wput is written by Hagen Fritsch debian/man/README0000755000000000000000000000035112225622156010626 0ustar #!/bin/sh # Unpack the $dest manual file so that paches to it can be applied # # The difference to Debian manual page patch can then be evaluated. # See diff.sh dest=original mkdir -p $dest cp -f ../../doc/*1 $dest/ # End of file debian/man/wput.1-debian.patch0000644000000000000000000000415512225622156013350 0ustar === modified file 'wput.1' --- wput.1 2009-12-15 13:00:10 +0000 +++ wput.1 2009-12-15 13:02:07 +0000 @@ -110,8 +110,8 @@ .IX Item "--less-verbose" .PD Be less verbose. That means reducing Wput's output to a minimun. Specifiing -this flag more often is equal to the --quiet flag. -Some people also like combining the -v and -nv flags, being quite senseless. +this flag more often is equal to the \-\-quiet flag. +Some people also like combining the \-v and \-nv flags, being quite senseless. .IP "\fB\-i\fR \fIfile\fR" 4 .IX Item "-i file" .PD 0 @@ -125,9 +125,9 @@ If \fIfile\fR is \-, the URLs will be read from stdin. .PD If you want to pipe the contents of the file that shall be uploaded to -stdin, this cannot be done (yet). But you can use the --input-pipe flag -and read the contents a) from a named pipe -I "cat named.pipe; echo > /dev/null" or b) -directly from the command, that outputs the data. (See --input-pipe) +stdin, this cannot be done (yet). But you can use the \-\-input\-pipe flag +and read the contents a) from a named pipe \-I "cat named.pipe; echo > /dev/null" or b) +directly from the command, that outputs the data. (See \-\-input\-pipe) .PD Do \fBnot\fR do things like \fIfind | wput ftp://host/ \-i \-\fR! Wput would upload all files from the current directory (since the first output @@ -169,7 +169,7 @@ .PD The hostname is only supplied if the ip cannot be resolved. If you do not want these parameters to confuse the programm from which you read -the contents, use something like '-I "cat file; echo > /dev/null"' so that these +the contents, use something like '\-I "cat file; echo > /dev/null"' so that these parameters are passed to echo and to /dev/null afterwards. Since the progressbar is not capable of handling unknown filesizes, the filesize is set to 1 GiB. Therefore the ETA shows a wrong value. @@ -194,7 +194,7 @@ .IP "\fB\-\-tries=\fR\fInumber\fR" 4 .IX Item "--tries=number" .PD -Set number of retries to \fInumber\fR. Specify -1 for infinite retrying, +Set number of retries to \fInumber\fR. Specify \-1 for infinite retrying, which is default, too. .IP "\fB\-nc\fR" 4 .IX Item "-nc" debian/debian-save-restore.mk0000644000000000000000000000464212225622156013367 0ustar # debian-save-restore.mk -- Save and restore original files # # Copyright # # Copyright (C) 2008-2012 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # This is GNU makefile part, that defines common variables, # targets and macros to be used from debian/rules. # # Usage (format 3.0) # # PACKAGE = foo # FILE_LIST_PRESERVE = # # override_dh_clean: # $(file-state-save) # dh_clean # $(file-state-restore-copy) # # Alternative usage, in case more file updates happens during configure etc. # # override_dh_auto_configure: # $(file-state-save) # # # override_dh_install: # dh_install # $(config-restore) # $(file-state-restore) # # binary-arch: # $(file-state-restore) # ... ifdef PACKAGE prefix := $(PACKAGE). endif define file-state-save # save files suffix=.original; \ for file in $(FILE_LIST_PRESERVE); \ do \ backup=/tmp/$(prefix)$$(echo $$file | sed 's,/,%,g')$$suffix; \ cp --archive --verbose "$$file" "$$backup"; \ done endef define file-state-restore-copy # restore files suffix=.original; \ for file in $(FILE_LIST_PRESERVE); \ do \ backup=/tmp/$(prefix)$$(echo $$file | sed 's,/,%,g')$$suffix; \ if [ -f "$$backup" ]; then \ dir=$$(dirname "$$file"); \ if [ "$$dir" != "." ]; then \ mkdir -p "$$dir"; \ fi; \ cp --archive --verbose "$$backup" "$$file"; \ fi; \ done endef define file-state-restore # restore files suffix=.original; \ for file in $(FILE_LIST_PRESERVE); \ do \ backup=/tmp/$(prefix)$$(echo $$file | sed 's,/,%,g')$$suffix; \ if [ -f "$$backup" ]; then \ dir=$$(dirname "$$file"); \ if [ "$$dir" != "." ]; then \ mkdir -p "$$dir"; \ fi; \ cp --archive --verbose "$$backup" "$$file"; \ rm "$$backup"; \ fi; \ done endef # End of file debian/patches/0000755000000000000000000000000012225631651010620 5ustar debian/patches/31-wput.1--option-order.patch0000644000000000000000000004252312225623011015711 0ustar From: Jari Aalto Subject: Order alphabetically, use GNU -o, --option format --- a/doc/wput.1 +++ b/doc/wput.1 @@ -1,8 +1,11 @@ .TH "wput" "1" "0.6.2" "Hagen Fritsch" "Internet Applications - FTP" + .SH "NAME" wput \- A wget\-like ftp\-uploader + .SH "SYNOPSIS" -wput [\fIoption\fR]... [\fI\s-1file\s0\fR]... [\fI\s-1URL\s0\fR]... +wput [\fIoptions\fR] \fI\s-1file [file ...\s0\fR] \fI\s-1URL \s0\fR + .SH "DESCRIPTION" Wput is a free utility that is able to upload files to a ftp-server. .PP @@ -27,7 +30,7 @@ .PP The upload-rate of Wput can be restricted, so that Wput won't eat all available bandwidth. -.SH "URL\-Input\-Handling" +.SS "URL\-Input\-Handling" URLs are recognized by the ftp://\-prefix .PP Wput first reads the URLs from command-line, and associates the first file with @@ -44,91 +47,34 @@ See \fIdoc/USAGE.examples\fR for further examples. .PP To be on the safe side, it is recommended to supply the files before the URLs. -.SH "Guessing Local File" +.SS "Guessing Local File" If Wput has an URL without a corresponding filename, Wput tries to guess the local file's location. e.g. using wput ftp://host/directory/path/file, Wput will look out for /directory/path/file. If not found, Wput looks for ./directory/path/file, ./path/file and ./file. + .SH "OPTIONS" -.SH "Basic Startup Options" -.IP "\fB\-V\fR" 4 -.IX Item "-V" -.PD 0 -.IP "\fB\-\-version\fR" 4 -.IX Item "--version" -.PD -Display the version of wput. -.IP "\fB\-h\fR" 4 -.IX Item "-h" -.PD 0 -.IP "\fB\-\-help\fR" 4 -.IX Item "--help" -.PD -Print a help screen, with a short description of wput's command-line options. -.IP "\fB\-b\fR" 4 -.IX Item "-b" -.PD 0 -.IP "\fB\-\-background\fR" 4 -.IX Item "--background" -.PD -Go to background immediately after startup. If no output file is given, -wput will redirect its output to "./wputlog" -.SH "Logging and Input File Options" -.IX Subsection "Logging and Input File Options" -.IP "\fB\-o\fR \fIlogfile\fR" 4 -.IX Item "-o logfile" -.PD 0 -.IP "\fB\-\-output\-file=\fR\fIlogfile\fR" 4 -.IX Item "--output-file=logfile" -.PD -Log all messages to \fIlogfile\fR. -.IP "\fB\-a\fR \fIlogfile\fR" 4 -.IX Item "-a logfile" -.PD 0 -.IP "\fB\-\-append\-output=\fR\fIlogfile\fR" 4 -.IX Item "--append-output=logfile" -.PD +.SS "Logging and Input File Options" +.TP +.BR \-a " \fIlogfile\fP, " \-\-append-output =\fIlogfile\fP Append all logged messages to \fIlogfile\fR. -.IP "\fB\-q\fR" 4 -.IX Item "-q" -.PD 0 -.IP "\fB\-\-quiet\fR" 4 -.IX Item "--quiet" -.PD -Turn off Wput's output. -.IP "\fB\-v\fR" 4 -.IX Item "-v" -.PD 0 -.IP "\fB\-\-verbose\fR" 4 -.IX Item "--verbose" -.PD -Turn on verbose output. This gives some more information about what Wput -does. If you specify this flag twice, you get debug output. -.IP "\fB\-nv\fR" 4 -.IX Item "-nv" -.PD 0 -.IP "\fB\-\-less\-verbose\fR" 4 -.IX Item "--less-verbose" -.PD -Be less verbose. That means reducing Wput's output to a minimum. Specifiing -this flag more often is equal to the \-\-quiet flag. -Some people also like combining the \-v and \-nv flags, being quite senseless. -.IP "\fB\-i\fR \fIfile\fR" 4 -.IX Item "-i file" -.PD 0 -.IP "\fB\-\-input\-file=\fR\fIfile\fR" 4 -.IX Item "--input-file=file" -.PD +.TP +.BR \-\-basename =\fIpath\fP +This option causes Wput to snip \fIpath\fR from all input\-files when they are +connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create +ftp://host//usr/share/doc.tgz, whereas specifying /usr/share/ as basename will +result in ftp://host/doc.tgz being created. +.TP +.BR \-i " \fIfile\fP, " \-\-input-file =\fIfile\fP Reads URLs and filenames from \fIfile\fR. If there are URLs on the command-line too, these will be retrieved first, unless sorting is enabled. See also the URL-Input-Handling section. -.PD + If \fIfile\fR is \-, the URLs will be read from stdin. -.PD If you want to pipe the contents of the file that shall be uploaded to stdin, this cannot be done (yet). But you can use the \-\-input\-pipe flag and read the contents a) from a named pipe \-I "cat named.pipe; echo > /dev/null" or b) directly from the command, that outputs the data. (See \-\-input\-pipe) -.PD + Do \fBnot\fR do things like \fIfind | wput ftp://host/ \-i \-\fR! Wput would upload all files from the current directory (since the first output of find will be '.') and afterwards each file again (since find postes its name to Wput. And further problematic is that Wput will upload each directory that @@ -137,188 +83,157 @@ Use \fIwput ftp://host/\fR to upload everything from the local directory. Or use \fIfind ! \-type d | wput ftp://host/ \-i \-\fR to tell find, not to output directories. -.IP "\fB\-s\fR" 4 -.IX Item "-s" -.PD 0 -.IP "\fB\-\-sort\fR" 4 -.IX Item "--sort" -.PD -If sorting is enabled Wput first reads all URLs from any input-devices available -and will sort them before transmitting each file. -.PD -The sorting order is: ip/hostname, port, username, password, directory, filename. -Sorting requires a bit more memory since all data needs to be hold there. -.IP "\fB\-\-basename=\fR\fIpath\fR" 4 -.IX Item "--basename=path" -.PD -This option causes Wput to snip \fIpath\fR from all input\-files when they are -connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create -ftp://host//usr/share/doc.tgz, whereas specifying /usr/share/ as basename will -result in ftp://host/doc.tgz being created. -.IP "\fB\-I\fR \fIcommand\fR" 4 -.IX Item "-I command" -.PD 0 -.IP "\fB\-\-input\-pipe=\fR\fIcommand\fR" 4 -.IX Item "--input-pipe=command" -.PD +.TP +.BR \-I " \fIcommand\fP, " \-\-input\-pipe= \fIcommand\fP If no file/directory can be "guessed" (see "Guessing Local File") from the URL, the output of \fIcommand\fB is taken as file-input. command is invoked as follows: -.PP + \& command ftp "username" "ip/hostname" port "remote_directory" "remote_filename" -.IP "" 4 -.PD + The hostname is only supplied if the ip cannot be resolved. If you do not want these parameters to confuse the program from which you read the contents, use something like '\-I "cat file; echo > /dev/null"' so that these parameters are passed to echo and to /dev/null afterwards. Since the progressbar is not capable of handling unknown filesizes, the filesize is set to 1 GiB. Therefore the ETA shows a wrong value. -.IP "\fB\-R\fR" 4 -.IX Item "-R" -.PD 0 -.IP "\fB\-\-remove\-source\-files\fR" 4 -.IX Item "--remove-source-files" -.PD +.TP +.BR \-nv ", " \-\-less\-verbose +Be less verbose. That means reducing Wput's output to a minimum. Specifying +this flag more often is equal to the \-\-quiet flag. +Some people also like combining the \-v and \-nv flags, being quite senseless. +.TP +.BR \-o " \fIlogfile\fP, " \-\-output\-file =\fIlogfile\fP +Log all messages to \fIlogfile\fP. +.TP +.BR \-q ", " \-\-quiet +Turn off Wput's output. +.TP +.BR \-R ", " \-\-remove\-source\-files Unlinks/deletes files that have been successfully transmitted. -.SH "Upload Options" +.TP +.BR \-s ", " \-\-sort +If sorting is enabled Wput first reads all URLs from any input-devices available +and will sort them before transmitting each file. + +The sorting order is: ip/hostname, port, username, password, directory, filename. +Sorting requires a bit more memory since all data needs to be held there. +.TP +.BR \-v ", " \-\-verbose +Turn on verbose output. This gives some more information about what Wput +does. If you specify this flag twice, you get debug output. + +.SS "Upload Options" .IX Subsection "Upload Options" -.IP "\fB\-\-bind\-address=\fR\fI\s-1ADDRESS\s0\fR" 4 -.IX Item "--bind-address=ADDRESS" -When making client \s-1TCP/IP\s0 connections, \f(CW\*(C`bind()\*(C'\fR to \fI\s-1ADDRESS\s0\fR on -the local machine. \fI\s-1ADDRESS\s0\fR may be specified as a hostname or \s-1IP\s0 -address. This option can be useful if your machine is bound to multiple +.TP +.BR \-A ", " \-\-ascii +Wput automatically determines which transfer\-format to use, by looking at +the file-extensions. Certain files are recognized as ASCII. These are: +txt, c, java, cpp, sh, f, f90, f77, f95, bas, pro, csh, ksh, conf, htm, html, php, pl, cgi, ing, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas + +Specifying this flag forces Wput to use ASCII mode file transfers. +.TP +.BR \-b ", " \-\-background +Go to background immediately after startup. If no output file is given, +wput will redirect its output to "./wputlog" +.TP +.BR \-B ", " \-\-binary +Specifying this flag forces Wput to use BINARY mode file transfers. +.TP +.BR \-\-bind\-address =\fIaddress\fP +When making client TCP/IP connections, bind() to \fIaddress\fP to +\fI\s-1address\s0\fP on the local machine. \fI\s-1address\s0\fP may br +specified as a hostname or \s-1IP\s0 address. This option can be +useful if your machine is bound to multiple IPs. -.IP "\fB\-t\fR \fInumber\fR" 4 -.IX Item "-t number" -.PD 0 -.IP "\fB\-\-tries=\fR\fInumber\fR" 4 -.IX Item "--tries=number" -.PD -Set number of retries to \fInumber\fR. Specify \-1 for infinite retrying, -which is default, too. -.IP "\fB\-nc\fR" 4 -.IX Item "-nc" -.PD 0 -.IP "\fB\-\-dont\-continue\fR" 4 -.IX Item "--dont-continue" -.PD +.BR \-\-force\-tls +If this flag is specified and Wput is linked with the OpenSSL-library, the flag +enforces the usage of TLS: If no TLS\-connection can be established the process +will cancel and not try to go on with an unencrypted connection. +.SS "Basic Startup Options" +.TP +.BR \-l " \fIrate\fP, " \-\-limit\-rate =\fIrate\fP +If you don't want Wput to eat up all available bandwidth, specify this flag. +\fIrate\fP is a numeric value. The units 'K' (for KiB) and 'M' (for MiB) are +understood. + +The upload rate is limited on average, meaning that if you limit the rate to +10K and Wput was just able to send with 5K for the first seconds, it will +send (if possible) afterwards more than 10K until the average rate of 10K is +fulfilled. +.TP +.BR \-m ", " \-\-chmod +This will change the access mode of the transferred files. The format is the +three-digit octal unix mode, e.g. 644 means rw-r--r--. +.TP +.BR \-nc ", " \-\-dont\-continue If this flag is specified, resuming will be turned off, meaning that a remote file being smaller than the local one will be overwritten. To skip this file, you have to enable \-\-skip\-existing. -.PD + See also \fIdoc/USAGE.resumehandling\fR -.IP "\fB\-u\fR" 4 -.IX Item "-u" -.PD 0 -.IP "\fB\-\-reupload\fR" 4 -.IX Item "--reupload" -.PD -If this flag is specified, a remote file having the same size as the local one -is to be uploaded. Skipping is default. -.IP "\fB\-\-skip\-larger\fR" 4 -.IX Item "--skip-larger" -.PD -If this flag is specified, a remote file being larger than the local one will -be skipped. Default is reuploading it. -.IP "\fB\-\-skip\-existing\fR" 4 -.IX Item "--skip-existing" -.PD -If this flag is specified, the upload of a file will be skipped if the remote -file already exists. -.IP "\fB\-N\fR" 4 -.IX Item "-N" -.PD 0 -.IP "\fB\-\-timestamping\fR" 4 -.IX Item "--timestamping" -.PD +.TP +.BR \-N ", " \-\-timestamping If timestamping is enabled, Wput will retrieve a directory list and parse it to determine the remote file\-date. If the local file is newer than the remote one (there is a default allowed timevariance of 5 seconds, which can be adjusted in the \fIwputrc\fR-file) it is uploaded, otherwise skipped. -.PD + The local date is dermined by the mtime (time of last modification), using the current time-zone. This should be equal to the output of ls \-l. -.PD + Since you usually do not want to resume existing files, you should employ the \-\-reupload \-\-dont-continue flags as well. -.IP "\fB\-l\fR \fIRATE\fR" 4 -.IX Item "-l RATE" -.PD 0 -.IP "\fB\-\-limit\-rate=\fR\fIRATE\fR" 4 -.IX Item "--limit-rate=RATE" -If you don't want Wput to eat up all available bandwidth, specify this flag. -\fIRATE\fR is a numeric value. The units 'K' (for KiB) and 'M' (for MiB) are -understood. -.PD -The upload rate is limited on average, meaning that if you limit the rate to -10K and Wput was just able to send with 5K for the first seconds, it will -send (if possible) afterwards more than 10K until the average rate of 10K is -fulfilled. -.IP "\fB\-\-no\-directories\fR" 4 -.IX Item "--no-directories" -.PD -If Wput is unable to CWD into a directory, it will try to create it. If this -is not the desired behaviour specify this flag to force Wput not to create -any directories. -.IP "\fB\-Y\fR \fIMODE\fR" 4 -.IX Item "-Y MODE" -.PD 0 -.IP "\fB\-\-proxy=\fR\fIMODE\fR" 4 -.IX Item "--proxy=MODE" -.PD -MODE can be either \fIhttp\fR for http-based proxies (such as SQUID), -\fIsocks\fR for SOCKSv5 proxies or \fIoff\fR to disable the proxy. -.IP "\fB\-\-proxy-user=\fR\fINAME\fR" 4 -.IX Item "--proxy-user=NAME" +.TP +.BR \-p ", " \-\-port\-mode +Per default, Wput uses passive mode ftp, which works well for most +configurations. If passive mode fails, Wput automatically falls back to +port mode. + +If you want Wput to start using port mode ftp, specify this flag. +.TP +.BR \-\-proxy =\fImode\fP +Alias is option \-Y. The \fImode\fP can be either \fIhttp\fR for http-based +proxies (such as SQUID), \fIsocks\fP for SOCKSv5 proxies or \fIoff\fP +to disable the proxy. +.TP +.BR \-\-proxy-user =\fIname\fP If the proxy\-server requires authentication, use \fINAME\fR as user-name. You need to specify \-\-proxy-pass too. These information can also be stored in the wputrc\-file. -.IP "\fB\-\-proxy-pass=\fR\fIPASS\fR" 4 -.IX Item "--proxy-pass=PASS" +.TP +.BR \-\-proxy\-pass =\fIpassword\fP Specifies the password to use for the proxy. -.SH "FTP Options" +.SS "FTP Options" .IX Subsection "FTP Options" -.IP "\fB\-p\fR" 4 -.IX Item "-p" -.PD 0 -.IP "\fB\-\-port\-mode\fR" 4 -.IX Item "--port-mode" -Per default, Wput uses passive mode ftp, which works well for most -configurations. If passive mode fails, Wput automatically falls back to -port mode. -.PD -If you want Wput to start using port mode ftp, specify this flag. -.IP "\fB\-A\fR" 4 -.IX Item "-A" -.PD 0 -.IP "\fB\-\-ascii\fR" 4 -.IX Item "--ascii" -Wput automatically determines which transfer\-format to use, by looking at -the file-extensions. Certain files are recognized as ASCII. These are: -txt, c, java, cpp, sh, f, f90, f77, f95, bas, pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas -.PD -Specifying this flag forces Wput to use ASCII mode file transfers. -.IP "\fB\-B\fR" 4 -.IX Item "-B" -.PD 0 -.IP "\fB\-\-binary\fR" 4 -.IX Item "--binary" -.PD -Specifying this flag forces Wput to use BINARY mode file transfers. -.IP "\fB\-m\fR\fIMODE\fR" 4 -.IX Item "-m" -.PD 0 -.IP "\fB\-\-chmod=\fR\fIMODE\fR" 4 -.IX Item "--chmod=" -.PD -This will change the access mode of the transferred files. The format is the -normal octal unix mode, e.g. 644 means rw-r--r--. -If \fIMODE\fR is omitted, the mode of the local file will be used. -.IP "\fB\-\-force-tls\fR" 4 -.IX Item "--force-tls" -If this flag is specified and Wput is linked with the OpenSSL-library, the flag -enforces the usage of TLS: If no TLS\-connection can be established the process -will cancel and not try to go on with an unencrypted connection. +.TP +.BR \-\-no\-directories +If Wput is unable to CWD into a directory, it will try to create it. If this +is not the desired behaviour specify this flag to force Wput not to create +any directories. +.TP +.BR \-t " \fInumber\fP, " \-\-tries =\fInumber\fP +Set number of retries to \fInumber\fP. Specify \-1 for infinite retrying, +which is default, too. +.TP +.BR \-u ", " \-\-reupload +If this flag is specified, a remote file having the same size as the local one +is to be uploaded. Skipping is default. +.TP +.BR \-\-skip\-larger +If this flag is specified, a remote file being larger than the local one will +be skipped. Default is reuploading it. +.TP +.BR \-\-skip\-existing +If this flag is specified, the upload of a file will be skipped if the remote +file already exists. +.SS General options +.TP +.BR \-V ", " \-\-version +Display the version of wput. +.TP +.BR \-h ", " \-\-help +Print a help screen, with a short description of wput's command-line options. + .SH DIAGNOSTICS Normally, the exit status is 0 if either everything went fine or there was nothing to do. @@ -327,6 +242,7 @@ remote error, exit status is 2. If some files failed and some others were skipped, exit status is 3. For general problems like failure of some system-functions the exit status is 4. + .SH BUGS .IX Header "BUGS" .PD @@ -339,11 +255,12 @@ analysing the problem. If you use a wputrc file, it might also be useful to provide the relevant parts of it. .PP 0 -If there is a crash due to a segfault or similar, try to run it in a debugger, -e.g. \f(CW\*(C`gdb `which wput` core\*(C'\fR and type \f(CW\*(C`where\*(C'\fR -to get the backtrace. It would also be great help if you could recompile wput -with memory-debugging support (make clean; make memdbg; [make install]) and use -this debug-dump. +If there is a crash due to a segfault or similar, try to run it in a +debugger, e.g. gdb /usr/bin/wput core and type where to get the +backtrace. It would also be great help if you could recompile wput +with memory-debugging support (make clean; make memdbg; [make +install]) and use this debug-dump. + .SH "SEE ALSO" .IX Header "SEE ALSO" Many options can be set in a wputrc file. For its documentation consult the @@ -351,6 +268,7 @@ .PD 0 There are some USAGE.* files in the doc/ directory of Wput. These contain further information and samples on how to use Wput. + .SH "AUTHOR" .IX Header "AUTHOR" Wput is written by Hagen Fritsch debian/patches/13-configure.in--gcrypt-link.patch0000644000000000000000000000072212225631651016767 0ustar Description: Drop -lgcrypt when testing for gnutls Author: Stephen Kitt --- a/configure.in +++ b/configure.in @@ -129,7 +129,7 @@ AC_CACHE_CHECK([for GNUTLS libraries], ac_cv_gnutls_libs, [ - LDFLAGS="$LDFLAGS $with_gnutls_libs -lgnutls -lgcrypt -lgnutls-openssl" + LDFLAGS="$LDFLAGS $with_gnutls_libs -lgnutls -lgnutls-openssl" AC_TRY_LINK_FUNC(gnutls_init, gnutls_libs="yes", gnutls_libs="no") LDFLAGS="$LDFLAGS_save" ]) debian/patches/30-man-doc--wput.1-hyphens.patch0000644000000000000000000000552012225623011016255 0ustar From: Jari Aalto Date: Tue, 15 Dec 2009 21:19:20 +0200 Subject: [PATCH] doc/wput.1: SH and typo fixes --- a/doc/wput.1 +++ b/doc/wput.1 @@ -49,7 +49,7 @@ local file's location. e.g. using wput ftp://host/directory/path/file, Wput will look out for /directory/path/file. If not found, Wput looks for ./directory/path/file, ./path/file and ./file. .SH "OPTIONS" -.Sh "Basic Startup Options" +.SH "Basic Startup Options" .IP "\fB\-V\fR" 4 .IX Item "-V" .PD 0 @@ -72,7 +72,7 @@ .PD Go to background immediately after startup. If no output file is given, wput will redirect its output to "./wputlog" -.Sh "Logging and Input File Options" +.SH "Logging and Input File Options" .IX Subsection "Logging and Input File Options" .IP "\fB\-o\fR \fIlogfile\fR" 4 .IX Item "-o logfile" @@ -153,7 +153,7 @@ .PD This option causes Wput to snip \fIpath\fR from all input\-files when they are connected to the URL. wput /usr/share/doc.tgz ftp://host/ would create -ftp://host//usr/share/doc.tgz, whereas specifing /usr/share/ as basename will +ftp://host//usr/share/doc.tgz, whereas specifying /usr/share/ as basename will result in ftp://host/doc.tgz being created. .IP "\fB\-I\fR \fIcommand\fR" 4 .IX Item "-I command" @@ -168,7 +168,7 @@ .IP "" 4 .PD The hostname is only supplied if the ip cannot be resolved. -If you do not want these parameters to confuse the programm from which you read +If you do not want these parameters to confuse the program from which you read the contents, use something like '\-I "cat file; echo > /dev/null"' so that these parameters are passed to echo and to /dev/null afterwards. Since the progressbar is not capable of handling unknown filesizes, the filesize @@ -180,7 +180,7 @@ .IX Item "--remove-source-files" .PD Unlinks/deletes files that have been successfully transmitted. -.Sh "Upload Options" +.SH "Upload Options" .IX Subsection "Upload Options" .IP "\fB\-\-bind\-address=\fR\fI\s-1ADDRESS\s0\fR" 4 .IX Item "--bind-address=ADDRESS" @@ -276,7 +276,7 @@ .IP "\fB\-\-proxy-pass=\fR\fIPASS\fR" 4 .IX Item "--proxy-pass=PASS" Specifies the password to use for the proxy. -.Sh "FTP Options" +.SH "FTP Options" .IX Subsection "FTP Options" .IP "\fB\-p\fR" 4 .IX Item "-p" @@ -295,7 +295,7 @@ .IX Item "--ascii" Wput automatically determines which transfer\-format to use, by looking at the file-extensions. Certain files are recognized as ASCII. These are: -txt, c, java, cpp, sh, f, f90, f77, f95, bas", pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas +txt, c, java, cpp, sh, f, f90, f77, f95, bas, pro, csh, ksh, conf, htm, html, php, pl, cgi, inf, js, asp, bat, cfm, css, dhtml, diz, h, hpp, ini, mak, nfo, shtml, shtm, tcl, pas .PD Specifying this flag forces Wput to use ASCII mode file transfers. .IP "\fB\-B\fR" 4 debian/patches/series0000644000000000000000000000024312225631213012026 0ustar 11-src--ftp-ls.c-compiling-fixes.patch 13-configure.in--gcrypt-link.patch 30-man-doc--wput.1-hyphens.patch 31-wput.1--option-order.patch 40-src--Makefile.in.patch debian/patches/40-src--Makefile.in.patch0000644000000000000000000000225012225623011015034 0ustar From: Jari Aalto Date: Tue, 15 Dec 2009 23:35:33 +0200 Subject: [PATCH] src/Makefile.in: add CFLAGS_EXTRA --- a/src/Makefile.in +++ b/src/Makefile.in @@ -5,7 +5,7 @@ bindir=@bindir@ localedir=$(prefix)/share/locale CC=@CC@ -CFLAGS= @CFLAGS@ -DLOCALEDIR=\"$(localedir)\" @GNUTLS_CFLAGS@ +CFLAGS= @CFLAGS@ -DLOCALEDIR=\"$(localedir)\" @GNUTLS_CFLAGS@ $(CFLAGS_EXTRA) LIBS=@LIBINTL@ @LIBS@ @GNUTLS_LIBS@ EXE=../wput GETOPT=@GETOPT@ --- a/Makefile.in +++ b/Makefile.in @@ -17,11 +17,11 @@ install: all cd po && $(MAKE) $(MAKEDEFS) $@ - mkdir -p $(destdir)$(bindir) - mkdir -p $(destdir)$(mandir) + install -m0755 -d $(destdir)$(bindir) + install -m0755 -d $(destdir)$(mandir) install -m0755 wput $(destdir)$(bindir) install -m0644 doc/wput.1.gz $(destdir)$(mandir) - ln -fs $(destdir)$(bindir)/wput $(destdir)$(bindir)/wdel + cd $(destdir)$(bindir) && ln -s wput wdel install -m0644 doc/wdel.1.gz $(destdir)$(mandir) @echo "----------------" @echo "Wput and Wdel installed. See 'wput/wdel -h' or 'man wput/wdel' for" @@ -36,4 +36,4 @@ rm -f $(destdir)$(bindir)/wdel rm -f $(destdir)$(mandir)/wput.1.gz rm -f $(destdir)$(mandir)/wdel.1.gz - + debian/patches/11-src--ftp-ls.c-compiling-fixes.patch0000644000000000000000000000056412225623011017437 0ustar From: Jari Aalto Date: Tue, 15 Dec 2009 18:02:49 +0200 Subject: [PATCH] src/ftp-ls.c: define _XOPEN_SOURCE to import strptime --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -29,6 +29,7 @@ so, delete this exception statement from your version. */ #include "config.h" +#define _XOPEN_SOURCE #include #include #include debian/changelog0000644000000000000000000001240712250570750011047 0ustar wput (0.6.2+git20130413-2) unstable; urgency=low * Build-depend on libgnutls-openssl-dev, thanks Andreas Metzler for the patch. (Closes: #731559.) * Standards-Version 3.9.5, no change required. -- Stephen Kitt Sat, 07 Dec 2013 11:01:09 +0100 wput (0.6.2+git20130413-1) unstable; urgency=low * New maintainer, thanks Jari for all your work on this package! (Closes: #701867.) * New upstream snapshot. * Drop patches 10 and 12, fixed upstream. * Refresh patch 11, and move _XOPEN_SOURCE declaration from debian/rules to the patch. * Refresh patches 30, 31 and 40. * Specify sf.net project page as homepage. * Always rebuild the .gmo files, and handle the absence of config.status. * Use canonical VCS URIs. * Standards-Version 3.9.4, no change required. * Drop -Wl,--as-needed, it prevents configure finding gnutls. * Test gnutls without gcrypt. (Closes: #638663.) -- Stephen Kitt Fri, 11 Oct 2013 01:10:08 +0200 wput (0.6.2-3) unstable; urgency=low * debian/clean - Add wput.hardened (hardened compilation result). * debian/compat - Update to 9 * debian/control - (Build-Depends): Update to debhelper 9, add autotools-dev. - (Standards-Version): update to 3.9.3.1 * debian/copyright - Update to format 1.0. * debian/patches - (31): New. Order options alphabetically and use -o, --option syntax. * debian/rules - Delete unnecessary targets. - Use hardened CFLAGS. http://wiki.debian.org/ReleaseGoals/SecurityHardeningBuildFlags * debian/*.mk - (debian-save-restore): New file. - Minor updates to other *.mk files. -- Jari Aalto Sat, 24 Mar 2012 04:32:09 -0400 wput (0.6.2-2) unstable; urgency=low * debian/rules - (config-stamp): Move "config-patch" before ./configure to install new config.{sub,guess} files (AVR32 FTBFS; Closes: #561378). -- Jari Aalto Wed, 16 Dec 2009 23:03:46 +0200 wput (0.6.2-1) unstable; urgency=low * New maintainer (Closes: #546992). * Move to format: 3.0 (quilt). * New upstream release. - (Closes: #511554): wput says file does not exist on big files. * debian/clean - New file. * debian/control - (Build-Depends): use debhelper 7. - (Depends): add ${misc:Depends}. - (Standards-Version): update to 3.8.3. - (Vcs-*): add. * debian/copyright - Adjust layout. - Use FSF URL. * debian/debian-{vars,autotools}: - New files. * debian/patches - (10, 11, 12): Add compilation cleanups. * debian/rules - (binary-arch): restore saved config.* files to prevent them from appearing in diff. This causes some lintian warning (see below). - (config-stamp): save old config.* files and use new ones from Debian. * debian/source/format - New file. Format: 1.0. * debian/source.lintian-overrides - New file. Ignore old config.* warnings (see rules::binary-arch). * debian/wput.{docs,examples,install,manpages} - New files. * debian/watch - New file. -- Jari Aalto Wed, 16 Dec 2009 00:25:43 +0200 wput (0.6-1.1) unstable; urgency=low * Non-maintainer upload. * Fix double-build FTBFS (Closes: #442765) by tweaking debian/rules: - Call "$(MAKE) clean" rather than "$(MAKE) distclean" since the latter doesn't exist. - Don't ignore "$(MAKE) clean" errors anymore, by checking for the presence of a Makefile. - Do not remove config.status since it's needed for the "clean" run in po/Makefile. - Remove doc/wput.1.gz through dh_clean. - Based on a patch by Kartik Mistry. * Move the config.{guess,sub} update to the config.status target, remove them in the clean target, they are now kept out of the Debian diff. * Use dh_install on wput and doc/wput.1, remove now useless gzip call, as well as useless (commented) dh_* calls. * Delete debian/dirs, no longer needed now that dh_install is used. * Move the Homepage from the description to a source field. * Bump Standards-Version from 3.7.2 to 3.7.3, no changes needed. -- Cyril Brulebois Tue, 26 Feb 2008 18:52:18 +0100 wput (0.6-1) unstable; urgency=low * New upstream release. * debian/control: + Updated to Standards-Version 3.7.2. + Added libgnutls-dev Build-Depends. * doc/wput.1: + Fixed hyphen-used-as-minus-sign in manpage. + Fixed version number in manpage. -- Khalid El Fathi Mon, 3 Jul 2006 14:38:17 +0200 wput (0.5-3) unstable; urgency=low * debian/control: Updated to Standards-Version 3.6.2 and download location. * debian/copyright: Updated download location and address of Free Software Foundation. -- Khalid El Fathi Wed, 31 Aug 2005 21:48:44 +0200 wput (0.5-2) unstable; urgency=low * Bug fix: "Typo in description times-tamping->time-stamping" (Closes: #310896). -- Khalid El Fathi Thu, 16 Jun 2005 10:10:57 +0200 wput (0.5-1) unstable; urgency=low * New upstream release -- Khalid El Fathi Mon, 6 Dec 2004 23:57:25 +0100 wput (0.4.1-1) unstable; urgency=low * Initial Release (Closes: bug#276991). * This is my first Debian package. ;) -- Khalid El Fathi Sun, 17 Oct 2004 23:52:51 +0200 debian/source/0000755000000000000000000000000012225622156010471 5ustar debian/source/format0000644000000000000000000000001412225622156011677 0ustar 3.0 (quilt) debian/control0000644000000000000000000000124212250570713010572 0ustar Source: wput Section: web Priority: optional Maintainer: Stephen Kitt Build-Depends: debhelper (>= 9), libgnutls-openssl-dev, autotools-dev Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/wput.git Vcs-Git: git://anonscm.debian.org/collab-maint/wput.git Homepage: http://wput.sourceforge.net/ Package: wput Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: tiny wget-like ftp-client for uploading files Wput is a tiny ftp-client, that uploads files or directories to a remote ftp-server. . Main features are: resuming, time-stamping, wget-like interface, proxy-support and speed-limit. debian/compat0000644000000000000000000000000212225622156010367 0ustar 9 debian/rules0000755000000000000000000000211412225631357010252 0ustar #!/usr/bin/make -f PACKAGE = wput include debian/debian-vars.mk include debian/debian-autotools.mk include debian/debian-save-restore.mk # Original sources modified by build process FILE_LIST_PRESERVE = \ Makefile \ po/Makefile \ po/Makefile.in \ src/Makefile \ src/config.h export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic DEBFLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) override_dh_auto_configure: $(config-save) $(config-patch) dh_auto_configure $(config-restore) override_dh_auto_build: $(MAKE) -C src CC="$(CC) $(DEBFLAGS)" # Copy this compiling result. The dh_auto_install step causes # recompilation (without our flags). cp --archive wput wput.hardened $(MAKE) -C po override_dh_install: dh_install # Replace binary with one compiled with our flags install -m 755 wput.hardened $(CURDIR)/debian/$(PACKAGE)/usr/bin/wput $(file-state-restore-copy) override_dh_auto_clean: rm -f po/stamp-po $(file-state-save) touch config.status dh_auto_clean rm -f config.status config.status.lineno po/*.gmo %: dh $@ # End of file debian/debian-autotools.mk0000644000000000000000000001004112225622156012767 0ustar #!/usr/bin/make -f # # debian-autotools.mk -- Common tasks for Autotools # # Copyright # # Copyright (C) 2008-2010 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # This is GNU makefile part that defines common variables, # targets and macros to be used in debian/rules. # # Dealing with packages that have old Autotools config.* files # we can: (1) Save package's config.* (2) Copy the latest from # Debian (3) restore package's config.* files. This way the # Debian *diff.gz stays clean and understandable to examine. In # addition if sources are kept in version control, they are not # flagged as modified. # # To install, add macro calls like this: # # override_dh_auto_configure: # $(make-depend-save) # $(config-prepare) # dh_auto_configure # # override_dh_auto_clean: # $(config-restore) # $(make-depend-restore) # dh_auto_clean ifneq (,) This makefile requires GNU Make. endif # ...................................................... make.depend ... define make-depend-save # make-depend-save: Save original file [ -f make.depend.original ] || cp -v make.depend make.depend.original endef define make-depend-restore # make-depend-restore: Restore original file [ ! -f make.depend.original ] || mv -v make.depend.original make.depend endef # ...................................................... config-h-in ... define config-h-in-save # config-h-in-save: Save original file [ -f config.h.in.original ] || cp -v config.h.in config.h.in.original endef define config-h-in-restore # config-h-in-restore: Restore original file [ ! -f config.h.in.original ] || mv -v config.h.in.original config.h.in endef # ........................................................ configure ... define config-configure-save # config-configure-save: Save original file [ -f configure.original ] || cp -v configure configure.original endef define config-configure-restore # config-configure-restore: Restore original file [ ! -f configure.original ] || mv -v configure.original configure endef # ........................................ Debian config.{sub,guess} ... define config-patch-sub # config-patch-sub: Use latest version from Debian [ ! -f /usr/share/misc/config.sub ] || \ cp -vf /usr/share/misc/config.sub . endef define config-patch-guess # config-patch-guess: Use latest version from Debian [ ! -f /usr/share/misc/config.guess ] || \ cp -vf /usr/share/misc/config.guess . endef # ............................................... config.{sub,guess} ... define config-save # config-save: Save original files [ ! -f config.sub ] || cp -v config.sub config.sub.original [ ! -f config.guess ] || cp -v config.guess config.guess.original endef define config-restore # config-restore: Restore original files [ ! -f config.sub.original ] || mv -v config.sub.original config.sub [ ! -f config.guess.original ] || mv -v config.guess.original config.guess endef define config-restore-copy # config-restore-copy: Copy original files [ ! -f config.sub.original ] || cp -v config.sub.original config.sub [ ! -f config.guess.original ] || cp -v config.guess.original config.guess endef define config-delete # config-delete: Delete config files rm -f config.sub config.guess endef define config-patch # config-patch: copy latest $(config-patch-sub) $(config-patch-guess) endef define config-prepare # config-prepare: save and patch $(config-save) $(config-patch) endef # End of Makefile part debian/docs0000644000000000000000000000013012225622156010036 0ustar doc/USAGE.examples doc/USAGE.resumehandling doc/USAGE.urlhandling doc/passwordfile TODO debian/examples0000644000000000000000000000001312225622156010724 0ustar doc/wputrc debian/source.lintian-overrides0000644000000000000000000000022512225622156014050 0ustar # source.lintian-overrides # This file is part of the original sources wput source: configure-generated-file-in-source config.status # End o file debian/manpages0000644000000000000000000000002612225622156010705 0ustar doc/wput.1 doc/wdel.1 debian/install0000644000000000000000000000001512225622156010556 0ustar wput usr/bin debian/debian-vars.mk0000644000000000000000000000476412225622156011730 0ustar #!/usr/bin/make -f # # debian-vars.mk -- Common variables # # Copyright # # Copyright (C) 2005-2010 Jari Aalto # # License # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # # Description # # This is GNU makefile part that defines common variables and # macros to be used from debian/rules. To install, add following # to the beginning of debian/rules: # # PACKAGE = foo # include debian/debian-vars.mk ifneq (,) This makefile requires GNU Make. endif PACKAGE ?= foo PIXPACKAGE ?= $(PACKAGE) ICONPACKAGE ?= $(PACKAGE) TOPDIR := $(shell pwd) PKGDIR = $(shell pwd)/debian/$(PACKAGE) SHAREROOTDIR = $(PKGDIR)/usr/share SHAREDIR = $(SHAREROOTDIR)/$(PACKAGE) DOCROOTDIR = $(SHAREROOTDIR)/doc PKGDOCDIR = $(DOCROOTDIR)/$(PACKAGE) SITELISPDIR = $(SHAREROOTDIR)/emacs/site-lisp PKGLISPDIR = $(SITELISPDIR)/$(PACKAGE) DESKTOPDIR = $(SHAREROOTDIR)/applications XSESSIONDIR = $(SHAREROOTDIR)/xsessions LOCALEDIR = $(SHAREROOTDIR)/locale INFODIR = $(SHAREROOTDIR)/info PIXDIR = $(SHAREROOTDIR)/pixmaps PKGPIXDIR = $(PIXDIR)/$(PIXPACKAGE) ICONDIR = $(SHAREROOTDIR)/icons PKGICONDIR = $(ICONDIR)/$(ICONPACKAGE) MANROOTDIR = $(SHAREROOTDIR)/man MAN1DIR = $(MANROOTDIR)/man1 MAN5DIR = $(MANROOTDIR)/man5 MAN7DIR = $(MANROOTDIR)/man7 MAN8DIR = $(MANROOTDIR)/man8 LIBROOTDIR = $(PKGDIR)/usr/lib LIBDIR = $(LIBROOTDIR)/$(PACKAGE) LIBPERLDIR = $(LIBROOTDIR)/perl BINDIR = $(PKGDIR)/usr/bin ETCDIR = $(PKGDIR)/etc PKGETCDIR = $(PKGDIR)/etc/$(PACKAGE) SBINDIR = $(PKGDIR)/usr/sbin GAMEBINDIR = $(PKGDIR)/usr/games INSTALL ?= /usr/bin/install INSTALL_DIR = $(INSTALL) -m 755 -d INSTALL_DATA = $(INSTALL) -p -m 644 # The difference is that "BIN" may contain binary strip option INSTALL_SCRIPT = $(INSTALL) -p -m 755 INSTALL_BIN = $(INSTALL) -p -m 755 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_BIN += -s endif # End of Makefile part