Bug 19246

Summary: Poor error message when fetching files with active mode ftp fails in bsd.port.mk.
Product: Base System Reporter: pmgleitz <pmgleitz>
Component: miscAssignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.4-STABLE   
Hardware: Any   
OS: Any   

Description pmgleitz 2000-06-13 17:30:02 UTC
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.
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-08-11 23:13:44 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports

This is a bsd.port.mk problem.
Comment 2 Maxim Sobolev freebsd_committer freebsd_triage 2001-03-13 16:32:03 UTC
Responsible Changed
From-To: freebsd-ports->asami

bsd.port.mk is a asami's land.
Comment 3 Will Andrews freebsd_committer freebsd_triage 2001-04-04 09:13:06 UTC
Responsible Changed
From-To: asami->portmgr

Over to new maintainer.
Comment 4 kientzle 2002-02-01 23:45:53 UTC
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
Comment 5 Kris Kennaway freebsd_committer freebsd_triage 2002-08-31 06:15:25 UTC
State Changed
From-To: open->suspended

Awaiting patch to implement requested behaviour
Comment 6 Kris Kennaway freebsd_committer freebsd_triage 2003-05-06 06:17:03 UTC
State Changed
From-To: suspended->closed

Timeout awaiting patch