| Summary: | Poor error message when fetching files with active mode ftp fails in bsd.port.mk. | ||
|---|---|---|---|
| Product: | Base System | Reporter: | pmgleitz <pmgleitz> |
| Component: | misc | Assignee: | Port Management Team <portmgr> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.4-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-bugs->freebsd-ports This is a bsd.port.mk problem. Responsible Changed From-To: freebsd-ports->asami bsd.port.mk is a asami's land. Responsible Changed From-To: asami->portmgr Over to new maintainer. Is there any reason to not simply change FETCH_CMD in bsd.port.mk to _always_ use passive-mode FTP? That would certainly solve the problem; the current setting means that people serious about network security can't really use the ports system at all. Tim Kientzle, kientzle@acm.org State Changed From-To: open->suspended Awaiting patch to implement requested behaviour State Changed From-To: suspended->closed Timeout awaiting patch |
I first ran into this when trying to build a kame application with bsd.port.mk, but the problem probably should be corrected in other makefiles. I run from behind a firewall that only permits passive mode ftp. When the make tries to fetch files from various repositories, /usr/bin/fetch fails to open the data channel in active mode ftp and after timing out moves on to the next repository, where it fails again for the same reason. At the end of this doomed iteration over repositories, the make gives up and advises fetching the files by hand. It seems to me this error message could be slightly more informative, perhaps advising that /etc/make.conf has an FTP_PASSIVE_MODE flag that should be investigated. The message you presently get is: ${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\ ${ECHO_MSG} ">> port manually into ${_DISTDIR} and try again."; \ Surely this could be expanded to suggest the possibility of setting the passive mode flags before having to deal with the painful alternative of hand fetching. As another possibility, the script might also be made smart enough to realize what has happened and either recover from the failure by setting passive mode or at least advising with an appropriate message about /etc/make.conf When I run an active mode ftp fetch from the command line, after a fashion, I get: PORT command successful. Sending: RETR sendmail893+3.2W.patch.gz Can't build data connection: Operation timed out. fetch: ftp://ftp.kyoto.wide.ad.jp//pub/mail/sendmail/sendmail893+3.2W.patch.gz: FTP error: fetch: Can't open data connection and surely this would be easy enough to parse and decide that a passive mode ftp would surely be more likely to succeed, so why not have the script say so. Fix: See full description for two suggestions.