From owner-freebsd-hubs Sun Mar 9 23:26:30 2003 Delivered-To: freebsd-hubs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20EC837B401; Sun, 9 Mar 2003 23:26:29 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7FAD43FB1; Sun, 9 Mar 2003 23:26:24 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from athlon.pn.xcllnt.net (athlon.pn.xcllnt.net [192.168.4.3]) by ns1.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2A7QDSd037715; Sun, 9 Mar 2003 23:26:15 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from athlon.pn.xcllnt.net (localhost [127.0.0.1]) by athlon.pn.xcllnt.net (8.12.8/8.12.8) with ESMTP id h2A7QDvd002369; Sun, 9 Mar 2003 23:26:13 -0800 (PST) (envelope-from marcel@athlon.pn.xcllnt.net) Received: (from marcel@localhost) by athlon.pn.xcllnt.net (8.12.8/8.12.8/Submit) id h2A7QBGg002368; Sun, 9 Mar 2003 23:26:11 -0800 (PST) (envelope-from marcel) Date: Sun, 9 Mar 2003 23:26:11 -0800 From: Marcel Moolenaar To: Chris Demers Cc: jason andrade , Kris Kennaway , "David O'Brien" , hubs@FreeBSD.ORG Subject: Re: Poor state of some top-level FTP mirrors Message-ID: <20030310072611.GB2126@athlon.pn.xcllnt.net> References: <20030309215448.GB30033@dragon.nuxi.com> <20030310013355.GA70336@rot13.obsecurity.org> <20030310064332.M84136@govital.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030310064332.M84136@govital.net> User-Agent: Mutt/1.5.3i Sender: owner-freebsd-hubs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, Mar 10, 2003 at 01:58:57AM -0500, Chris Demers wrote: > > I took a quick look around to find out just how this was being done and i > couldn't find it. So i'm going to do some assuming and make some suggestions. > Assuming a full package build is normally just pushed out for distribution, > this would cause much unneeded bandwidth usage among all of the mirror sites. > Wouldn't it be just better to maybe keep a record of the fingerprint of a > port and if it matched from the last build not send it out to the mirrors so > that only things that have been updated get pushed out? Compilers put a timestamp in the object file. Rebuilding from identical sources will yield a different object file. With some wrapping and preprocessor magic, you should be able to compare at the source level. The logic would work something like this: Create a wrapper for cc(1) or c++(1) that runs the compiler as usual, but also runs "cc -E" with the arguments passed to the wrapper. The output of each "cc -E" is appended to a single file (call it port.src). After the build has completed, you compare the current port.src with the previous port.src and if they are equal then build system variation did not affect this port and you can ignore the build. If they are different then there's a possibility that the port is affected (no guarantees), which means you redistribute to be on the safe side. In practice this means that when we branch, bump the FreeBSD version or upgrade the C compiler *all* packages are going to be redistributed. This is what you want. The penalty is minimal if the wrapper does it right (ie run cc -E to a temporary file, append the temporary file to port.src and also use it for the actual compilation). -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hubs" in the body of the message