From owner-freebsd-ports@FreeBSD.ORG Sun Oct 9 09:16:06 2005 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DED0616A41F for ; Sun, 9 Oct 2005 09:16:06 +0000 (GMT) (envelope-from rabe@p-i-n.com) Received: from aposerv.p-i-n.com (aposerv.p-i-n.com [145.253.185.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20DC143D48 for ; Sun, 9 Oct 2005 09:16:05 +0000 (GMT) (envelope-from rabe@p-i-n.com) Received: from p-i-n.com (inside.p-i-n.com [129.10.9.21]) by aposerv.p-i-n.com (8.12.11/8.12.11) with ESMTP id j999G3IM063532 for ; Sun, 9 Oct 2005 11:16:03 +0200 (CEST) (envelope-from rabe@p-i-n.com) Received: (from rabe@localhost) by p-i-n.com (8.11.6/8.11.6) id j999Fvj91174 for ports@freebsd.org; Sun, 9 Oct 2005 11:15:57 +0200 (CEST) (envelope-from rabe) Date: Sun, 9 Oct 2005 11:15:57 +0200 From: "Raphael H. Becker" To: ports@freebsd.org Message-ID: <20051009111557.A89611@p-i-n.com> References: <20050928002013.11564.qmail@exxodus.fedaykin.here> <20050928053534.GB15395@local.net> <20050928100141.57485.qmail@exxodus.fedaykin.here> <20050928142537.O33058@p-i-n.com> <20050928144524.P33058@p-i-n.com> <20050928140328.GB99553@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20050928140328.GB99553@xor.obsecurity.org>; from kris@obsecurity.org on Wed, Sep 28, 2005 at 10:03:28AM -0400 Organization: PHOENIX Pharmahandel AG & Co KG, Mannheim, Deutschland Cc: Subject: Re: distfiles / md5 / plain-text via FTP proxy X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Oct 2005 09:16:07 -0000 On Wed, Sep 28, 2005 at 10:03:28AM -0400, Kris Kennaway wrote: > On Wed, Sep 28, 2005 at 02:45:24PM +0200, Raphael H. Becker wrote: > > Apropos "md5-secured" distfiles: > > > > If you use a proxy (e.g.squid) for ftp, it might use FTP-ASCII for > > transfer, not BINARY, which might result in a inband conversation from > > CRLF to LF in FTP for ASCII-files (.txt, .c, ... ) > > > > Some ports with distfile patches as textfiles or plain c-Sources > > (GhostScript, squid(?), ... ) complain about bad md5-sums. > > > > Deleting this files and refetching without proxy > > (ftp_proxy="" portupgrade -rF foo/bar) is a manual workaround for this. > > > > In some environments you don't have ftp without a (squid)proxy. > > > > Any idea or better workaround? > > I'd like to know one too. This is arguably a bug in squid, since it > should not be rewriting content without me telling it to. No workaround, but how to repeat: $ ftp_proxy="" fetch -o gdevlx50.c_noproxy \ "ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ghostscript/gdevlx50.c" $ ftp_proxy="http://localhost:3128/" fetch -o gdevlx50.c_proxy \ "ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ghostscript/gdevlx50.c" $ wc -lc gdevlx50.c_* 2732 99428 gdevlx50.c_noproxy 2732 102160 gdevlx50.c_proxy $ file gdevlx50.c_* gdevlx50.c_noproxy: ASCII C program text gdevlx50.c_proxy: ASCII C program text, with CRLF line terminators $ md5 gdevlx50.c_* MD5 (gdevlx50.c_noproxy) = 081e355c866316a56fbbff5b59f2b7cf MD5 (gdevlx50.c_proxy) = 06b0518d1d0aeedd61d4c7d27921cf62 $ grep gdevlx50.c /usr/ports/print/ghostscript-gnu/distinfo MD5 (ghostscript/gdevlx50.c) = 081e355c866316a56fbbff5b59f2b7cf SIZE (ghostscript/gdevlx50.c) = 99428 All plain text distfiles fetched using ftp through squid are affected! My personal workaround for this is a MASTER_SITE_OVERRIDE in /etc/make.conf with a http-Server: MASTER_SITE_OVERRIDE?=http://ftp.plusline.de/FreeBSD/distfiles/${DIST_SUBDIR}/ $ http_proxy="http://localhost:3128/" fetch -o gdevlx50.c_proxy_http \ "http://ftp.plusline.de/FreeBSD/distfiles/ghostscript/gdevlx50.c" $ md5 gdevlx50.c_* MD5 (gdevlx50.c_noproxy) = 081e355c866316a56fbbff5b59f2b7cf MD5 (gdevlx50.c_proxy) = 06b0518d1d0aeedd61d4c7d27921cf62 MD5 (gdevlx50.c_proxy_http) = 081e355c866316a56fbbff5b59f2b7cf Regards Raphael Becker