From owner-freebsd-stable@FreeBSD.ORG Tue Nov 27 07:52:54 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D651A303 for ; Tue, 27 Nov 2012 07:52:54 +0000 (UTC) (envelope-from fluca1978@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 779C88FC08 for ; Tue, 27 Nov 2012 07:52:54 +0000 (UTC) Received: by mail-vc0-f182.google.com with SMTP id fo13so16411818vcb.13 for ; Mon, 26 Nov 2012 23:52:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=ExDiIOYVYXZr8YgRbU4ijbMaQThB+mZHaoQKCpz6ugI=; b=sRbTCQ+zBJwC6e2tPwPjbmWXGkQlo/tFleho1dyKsGPA8zof504fc+q3uuR1wwhJA3 OtrBsWY9CO+eVl5q3ogYYicQH08hnBxsHkwYPWFtiRVLttI+/vhXNzrGPozL8zVqiwzs XxPmLTWPHLqoOCZgcDZoS00tAV7nKOfyGnNJzVXIa+A7lSpXX10e6v5niIsDYxVeL4qn HMJ9oNBxH3aErzVRu1EUo9FPjr5mOqIXEYzMIEDZX9z26CWkOI+lCHoOySJeN6P8C5l0 mvlJGxhtHqfsR+x8ZfQO4AbDdCln7Y0DztXFYJQusuutDZB30D8k52s+istKBQ9WLtZT cLYQ== MIME-Version: 1.0 Received: by 10.220.153.144 with SMTP id k16mr23162371vcw.41.1354002773365; Mon, 26 Nov 2012 23:52:53 -0800 (PST) Sender: fluca1978@gmail.com Received: by 10.220.2.137 with HTTP; Mon, 26 Nov 2012 23:52:52 -0800 (PST) Date: Tue, 27 Nov 2012 08:52:52 +0100 X-Google-Sender-Auth: -5bdugZTUz3TxAf1-v3Y-DHuqrQ Message-ID: Subject: simple patch for portsnap to use wget From: Luca Ferrari To: freebsd-stable@freebsd.org Content-Type: multipart/mixed; boundary=f46d043c7df854d37b04cf75568c X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2012 07:52:55 -0000 --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 ZWNobyAiTHVjYSBGZXJyYXJpIC0gZmx1Y2ExOTc4IChhdCk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