Commit Graph

165 Commits

Author SHA1 Message Date
des
5a55cbe1eb Reorder LDADD to fix static linking. 2002-06-12 12:46:50 +00:00
ru
876652376e libfetch now depends on libcrypto and libssl. 2002-06-06 13:45:46 +00:00
des
88a7e46829 Figures they had to call it NOCRYPT instead of NOCRYPTO. 2002-06-05 21:28:47 +00:00
des
694ae4fc45 During buildworld, "regular" libraries are built before crypto stuff, so
libfetch can't depend on lib{crypto,ssl}.  Move the dependency to fetch
until we can figure out how to fix this.
2002-06-05 21:25:33 +00:00
des
4d6b787d2d Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
charnier
a07fb1cc07 Use `The .Nm utility' 2002-04-19 23:44:58 +00:00
bde
c2a1e52896 Restored the part of 1.45 that was clobbered in rev.1.46:
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.
2002-03-27 02:23:18 +00:00
charnier
896929d2ba Add FBSDID. Remove unused include. Getopt returns -1 not EOF. 2002-03-26 12:09:49 +00:00
bde
b3ad16b2d7 #include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval.

Removed unused includes (<time.h> doesn't declare anything of interest;
only <sys/time.h> does).

Sorted includes a bit.
2002-02-25 05:00:39 +00:00
des
4c0d10cd1b If downloading to a temporary file, set the timestamp on the temp file, not
on the file we're replacing.

PR:		bin/34992
Submitted by:	Shunichiro Ariura <syun1rou@blackshell.org>
MFC after:	1 week
2002-02-16 14:02:57 +00:00
markm
ae2558974f Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +00:00
ru
66616c46ce Document fetch(1) reaction to SIGINFO.
PR:		docs/33640
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
Approved by:	des
2002-01-16 16:16:08 +00:00
des
a1922f6bbf Set fetchDebug if v_level is 3 or more.
PR:		bin/32615
MFC after:	1 week
2001-12-09 15:07:26 +00:00
iedowse
526c677d03 Remove an extraneous argument to fprintf that -Wformat noticed.
Reviewed by:	des
2001-11-10 18:39:54 +00:00
des
572d6d9be0 Remove a debugging warnx() that got committed by mistake. 2001-11-03 01:31:46 +00:00
des
3274d63b58 Don't print running stats unless we're the foreground process.
PR:		30764
2001-09-23 22:03:39 +00:00
mike
fe5200b07e Add a cast to silence a warning (error because of WARNS=2) on Alpha.
Discussed with:	des
2001-09-10 17:23:57 +00:00
des
80b788da32 If the local file does not exist, or is a regular file, and we're not trying
to resume a transfer, download the requested document into a temporary file
which we later rename.  This avoids leaving half-completed files around in
case of a crash (it'll still leave a half-completed file, but with a  hope-
fully non-conflicting name), and should reduce the need for human inter-
vention on ports-building machines.

The temporary file name for "foo/bar" is constructed by invoking mkstemps()
with the pattern "foo/.fetch.XXXXXX.bar"

Requested by:	obrien
2001-09-08 15:17:15 +00:00
des
4debb1b901 Remove a blank line that snuck in with the previous commit.
Set the default timeout to 120 seconds instead of 0 (no timeout).
2001-08-18 10:48:55 +00:00
des
f1dd0e9302 Add some comments. 2001-08-17 22:22:45 +00:00
se
815cafd7d0 Include value of command line argument that causes an error message or
warning in said message, since fetch may be run from a makefile or script
which does not print the command line.

Approved by:	des
2001-07-28 21:34:56 +00:00
des
45c6fea352 If we're writing to stdout, we don't care about the size.
Submitted by:	wollman
2001-07-17 21:23:43 +00:00
des
1d3699a988 WARNS cleanup + remove an unused macro and an unused function argument. 2001-07-17 21:22:32 +00:00
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
des
edbf7599a6 Fix an embarassing if-test-reversal bug that broke scheme guessing. 2001-07-08 15:17:26 +00:00
des
e576be9a24 Don't try to print a completion percentage for zero-size files.
PR:		27780
Submitted by:	Craig Leres <leres@ee.lbl.gov>
2001-06-01 10:24:58 +00:00
des
c652271f23 Damn. Fix typo in previous commit. 2001-05-27 10:46:19 +00:00
des
b7626578b0 When running on a tty, install an authentication callback. 2001-05-26 19:51:05 +00:00
des
30512a1dcf Bring the usage message in synch with reality.
PR:		bin/26160
2001-03-28 21:01:07 +00:00
des
deabc3a379 Now that libfetch uses the high port range by default, add a -U option to
make it use the low (default) port range instead.
2001-03-24 00:32:11 +00:00
des
0a97af408f If SIGINFO is received during the transfer, print a status line similar
to the summary shown at the end of the transfer.

Some days, I really hate Unix...

Suggested by:	cracauer
2001-03-07 05:33:50 +00:00
des
41113a8cdf Fix a formatting bug (MFC candidate) 2001-03-07 03:22:11 +00:00
ru
8a6f8b5fe4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
des
d6547b8df5 Warn if the size of the remote file isn't known.
If the -R option was specified, don't truncate the local file even if its
mtime is incorrect.

PR:		bin/23719
2000-12-22 18:23:19 +00:00
des
5612c73391 If the URL did not specify a scheme, try to guess it from the host name. 2000-12-13 11:26:27 +00:00
des
517ed0bad5 If the transfer timed out, but we don't know how large the file is supposed
to be, assume it was truncated.
2000-11-30 10:08:22 +00:00
kris
303a4f96b9 Format string auditing 2000-11-27 07:35:53 +00:00
ru
835a46c9c2 mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
ru
3b7dc88538 Spell the des's name correctly. 2000-11-14 13:19:26 +00:00
des
1763356b83 Understand the difference between an empty file and a non-existent file.
This has been sitting in my tree for ages...
2000-10-19 21:05:59 +00:00
des
10398016b8 Don't try to set the mtime of the output file if it's not a regular file.
Pointed out by:	cwt
2000-09-02 09:48:34 +00:00
des
23f9ab64bf Don't unlink the target file if it's not a regular file. 2000-08-31 11:24:15 +00:00
des
cef359aa2c Restore the old semantics of deleting the output file when interrupted.
Some people liked this and some didn't, so POLA won.
2000-07-26 07:28:33 +00:00
des
d88213abd9 Don't print summary in quiet mode. 2000-07-21 14:21:29 +00:00
des
d81bffbebb Don't display a running count in quiet mode.
Don't add the offset to the size; it's libfetch's job to report the correct
size of the requested file.
2000-07-21 11:08:03 +00:00
des
3ce22a8bc5 Fix two bugs related to resumed transfers:
- if the dates didn't match, fetch would append the received file to the
    existing file instead of replacing it.

  - if the local file was complete and up-to-date, fetch would miscalculate
    the expected size and report a failure instead of a success, because it
    had no way of knowing that the server was actually resending the entire
    file since the requested offset was invalid.
2000-07-19 23:56:45 +00:00
des
e8e313d17b Braino: don't use passive mode unless the user requests it.
PR:		bin/20025
Submitted by:	HIYAMA Takeshi <th@cis.ibaraki.ac.jp>
2000-07-19 09:12:36 +00:00
ben
3932cf62e5 * Remove description of obsolete -t option.
* Insert newline before "and" in ".Fl c and".

Approved by:	des
2000-07-18 21:05:11 +00:00
des
29b66ff09c The description of the semantics of -v and -q has long since been OBE. 2000-07-17 22:44:36 +00:00
des
0a49b612e7 While I'm at it, break a line that was too long, remove a pointless diagnostic
and adjust the verbosity level of another.
2000-07-17 22:44:00 +00:00