Bug 39796

Summary: Making ports fails behind ftp proxy without setenv
Product: Documentation Reporter: Jonathan Laventhol <jonathan-dot-laventhol>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Jonathan Laventhol 2002-06-24 19:10:01 UTC
The ports process (often) gets distfiles by ftp using fetch(1),
which, if you have an ftp proxy, requires you to set the environment
variable FTP_PROXY.  The documentation needs to say so.

Fix: 

Add a paragraph to the manual at
http://www.freebsd.org/handbook/ports-using.html#PORTS-INET

"The ports mechanism uses fetch(1) which can use web and FTP proxies
if you set appropriate environment variables, as documented in fetch(3).
For example using root's default csh(1), you do
  setenv FTP_PROXY ftp://myproxy.mycompany.co.uk"

NB: If you're not using csh environment variables are set differently.
If you don't have fetch(1) then the Makefile uses ftp(1) which uses
different environment variables.  This is probably a subject for
the page http://www.freebsd.org/handbook/ports-trouble.html
How-To-Repeat: On a system with no direct connection to the internet but with
an ftp proxy, use /stand/sysinstall to install the ports collection.
Then cd /usr/ports/astro/jday ; make
Problem manifests as 'Attempting to fetch from ...', (15 seconds timeout)
then 'fetch: jday-1.2.tar.gz: No route to host'
Comment 1 bradyn 2002-06-25 15:23:16 UTC
On Mon, 24 Jun 2002 11:05:02 PDT, Jonathan Laventhol said:
>
>Add a paragraph to the manual at
>http://www.freebsd.org/handbook/ports-using.html#PORTS-INET
>
>"The ports mechanism uses fetch(1) which can use web and FTP proxies
>if you set appropriate environment variables, as documented in fetch(3).
>For example using root's default csh(1), you do
>  setenv FTP_PROXY ftp://myproxy.mycompany.co.uk"
>
>NB: If you're not using csh environment variables are set differently.
>If you don't have fetch(1) then the Makefile uses ftp(1) which uses
>different environment variables.  This is probably a subject for
>the page http://www.freebsd.org/handbook/ports-trouble.html

You may want to add a para about adding these settings to /etc/make.conf
as well in that case (FETCH_ENV, documented in /etc/defaults/make.conf).
This makes it permanent for the system in a sensible way...

If someone thinks it's appropriate to add to the handbook, I'll
sgml-ize it later... although it may be more appropriate full-stop
to just add it to the ports-trouble section?

-- 
	Niall
Comment 2 nik freebsd_committer freebsd_triage 2002-06-29 21:36:57 UTC
State Changed
From-To: open->closed

I've added a couple of paragraphs explaining the relationship between 
ports/pkg_add and fetch(1)/fetch(3), so the reader knows where to look 
for more info. 

Thanks.