From owner-freebsd-questions@FreeBSD.ORG Thu May 11 06:53:10 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08EE416A400 for ; Thu, 11 May 2006 06:53:10 +0000 (UTC) (envelope-from freebsd@philip.pjkh.com) Received: from bravo.pjkh.com (bravo.pjkh.com [72.36.232.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA09343D46 for ; Thu, 11 May 2006 06:53:09 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from bravo.pjkh.com (bravo.pjkh.com [72.36.232.219]) by bravo.pjkh.com (Postfix) with ESMTP id B2BE513C7E5; Thu, 11 May 2006 01:55:55 -0500 (CDT) Received: by bravo.pjkh.com (Postfix, from userid 1000) id 28D1F13C7E3; Thu, 11 May 2006 01:55:55 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by bravo.pjkh.com (Postfix) with ESMTP id 25F5A13C404; Thu, 11 May 2006 01:55:55 -0500 (CDT) Date: Thu, 11 May 2006 01:55:55 -0500 (CDT) From: Philip Hallstrom To: Pablo Mora In-Reply-To: Message-ID: <20060511015100.U89265@bravo.pjkh.com> References: <20060510212545.B59324@bravo.pjkh.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-questions@freebsd.org Subject: Re: limit bandwidth 'make fetch' X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 May 2006 06:53:10 -0000 > On 5/10/06, Philip Hallstrom wrote: >> > how i can limit bandwidth when i using 'make fetch' (make install in >> Ports)? >> >> I wrote a patch to fetch awhile back that does exactly this. That was >> with 4.x, but it might apply cleanly in 6. I ended up not using it, well >> cause once I had everything installed it didn't seem to matter so much. >> >> http://www.pjkh.com/~philip/fetch/ >> >> Basically it adds a "-L" option that takes the b/s to throttle it at... >> >> Then tweak um.. FETCH_ARGS or something close to that (man ports for info) >> to get the ports to pick it up automatically. >> >> -philip >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" >> > > Thanks Philip, but exist other way? > > zean@~: uname -r > 5.4-RELEASE Seems to work on my 5.4 box... % uname -r 5.4-RELEASE % cd /usr/src/usr.bin/fetch % patch < fetch.1.diff Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** fetch.1-orig Wed Mar 5 16:43:34 2003 |--- fetch.1 Wed Mar 5 16:45:04 2003 -------------------------- Patching file fetch.1 using Plan A... Hunk #1 succeeded at 110 (offset 3 lines). done % patch < fetch.c.diff Hmm... Looks like a new-style context diff to me... The text leading up to this was: -------------------------- |*** fetch.c.orig Tue May 24 15:07:34 2005 |--- fetch.c Tue May 24 15:07:21 2005 -------------------------- Patching file fetch.c using Plan A... Hunk #1 succeeded at 82 (offset 1 line). Hunk #2 succeeded at 320 with fuzz 2 (offset 8 lines). Hunk #3 succeeded at 595 (offset 11 lines). Hunk #4 succeeded at 710 (offset 8 lines). Hunk #5 succeeded at 731 (offset 11 lines). Hunk #6 succeeded at 772 (offset 8 lines). done % make Warning: Object directory not changed from original /usr/src/usr.bin/fetch cc -O -pipe -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -c fetch.c cc -O -pipe -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -o fetch fetch.o -lfetch -lssl -lcrypto gzip -cn fetch.1 > fetch.1.gz % % ./fetch -v usage: fetch [-146AFMPRUadlmnpqrsv] [-N netrc] [-o outputfile] [-S bytes] [-B bytes] [-T seconds] [-w seconds] [-L bytes/sec] [-h host -f file [-c dir] | URL ...] just follow that up with a make install and you should be okay.