Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2012 08:52:52 +0100
From:      Luca Ferrari <fluca1978@infinito.it>
To:        freebsd-stable@freebsd.org
Subject:   simple patch for portsnap to use wget
Message-ID:  <CAKoxK%2B5iy2R7=cZp38xKZpTbgFd0aZ3H28tVmPnuPR01w=pO4A@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--f46d043c7df854d37b04cf75568c
Content-Type: text/plain; charset=ISO-8859-1

Hi all,
I was in trouble for a while because I was using FreeBSD behind an
http proxy (a palo alto for what it means) and the portsnap command
was unable to handle updates reporting always "file does not exist".
After digging I found that the problem was in the phttpget command
used internally from portsnap: phttpget is not able to handle an
http_proxy variable in the form of http://user:password@proxy:port
since the first colon is understood as a port separator and therefore
phttpget tries to connect to the host "user" on port
"password@proxy:port". Since I did not found much documentation about
how to solve the problem, and nobody on the forum was able to point me
in any direction (see
http://forums.freebsd.org/showthread.php?t=28849) I wrote a simple
patch to modify portsnap to use wget instead of phttpget.
Of course, this means you have to install wget first, and also the
laminating of the files to download has slightly changed within
portsnap, but I'm using it from several days and updates now and it
seems to work well.
Now the question is: should this patch, or better the idea of using
wget or another alike substitute to phttpget, be integrated into the
system?
I've tested it on FreeBSD-9-STABLE.

Regards,
Luca

--f46d043c7df854d37b04cf75568c
Content-Type: application/octet-stream; name="portsnap_wget.patch"
Content-Disposition: attachment; filename="portsnap_wget.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ha0q8pdb1

MjY4YzI2OCwyNzEKPCBQSFRUUEdFVD0vdXNyL2xpYmV4ZWMvcGh0dHBnZXQKLS0tCj4gUEhUVFBH
RVQ9L3Vzci9sb2NhbC9iaW4vd2dldAo+Cj4gZWNobyAiV0FSTklORzogdGhpcyB2ZXJzaW9uIG9m
IHBvcnRzbmFwIGlzIHVzaW5nICRQSFRUUEdFVCBhcyBXZWItSFRUUC1HZXQgcHJvZ3JhbSEiCj4g
ZWNobyAiTHVjYSBGZXJyYXJpIC0gZmx1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