From nobody@FreeBSD.org  Fri May  3 17:00:51 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	by hub.freebsd.org (Postfix) with ESMTP id F26F8D47
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 May 2013 17:00:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [69.147.83.34])
	by mx1.freebsd.org (Postfix) with ESMTP id E430E10F1
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  3 May 2013 17:00:51 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r43H0po8055010
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 3 May 2013 17:00:51 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r43H0pQ6055009;
	Fri, 3 May 2013 17:00:51 GMT
	(envelope-from nobody)
Message-Id: <201305031700.r43H0pQ6055009@red.freebsd.org>
Date: Fri, 3 May 2013 17:00:51 GMT
From: "Wojciech A. Koszek" <wkoszek@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pkg_add should get shipped with PACKAGEROOT with http:// for better usability
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         178323
>Category:       bin
>Synopsis:       pkg_add(1) should get shipped with PACKAGEROOT with http:// for better usability
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 03 17:10:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sat May 04 21:23:52 UTC 2013
>Originator:     Wojciech A. Koszek
>Release:        FreeBSD 9.1-RELEASE-p3
>Organization:
FreeBSD
>Environment:
FreeBSD freebsd_x64 9.1-RELEASE-p3 FreeBSD 9.1-RELEASE-p3 #0: Mon Apr 29 18:27:25 UTC 2013     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
In corporate environment behind firewall like BlueCoat Firewall it's significantly more difficult to figure out how to make FTP work than e.g.: HTTP. 

BlueCoat fetches files to itself, performs virus scanning and comes back to the user app. For some reason HTTP works OK, while FTP doesn't.

I use fetch(1) as my FTP agent. I use pkg_add -rv git. It gets stuck after passive 

freebsd_x64# echo $ftp_proxy
ftp://proxy:21


with http:// it works seamlessly:

To lover the cost for making FreeBSD work behind the firewall, I sugegst we use:

PACKAGEROOT http://ftp.freebsd.org

>How-To-Repeat:
 freebsd_x64# pkg_add -vr git
 scheme:   [ftp]
 user:     []
 password: []
 host:     [ftp.freebsd.org]
 port:     [0]
 document: [/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/git.tbz]
 scheme:   [ftp]
 user:     []
 password: []
 host:     [proxy]
 port:     [0]
 document: [/]
 ---> proxy:21
 looking up proxy
 connecting to proxy:21
 <<< 220 Blue Coat FTP Service
 >>> USER anonymous@ftp.freebsd.org
 <<< 331 Please specify the password.
 >>> PASS wkoszek@freebsd_x64
 <<< 230 Login successful.
 >>> PWD
 <<< 257 "/"
 >>> CWD pub/FreeBSD/ports/amd64/packages-9.1-release/Latest
 <<< 250 CWD command successful.
 >>> MODE S
 <<< 200 Command okay.
 >>> TYPE I
 <<< 200 Command okay.
 setting passive mode
 >>> PASV
 
 [stuck]
>Fix:
We ship with PACKAGEROOT set to http://... to make firewall-related problems less visible.
>Release-Note:
>Audit-Trail:
>Unformatted:
