Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Mar 2003 23:26:11 -0800
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Chris Demers <admin@govital.net>
Cc:        jason andrade <jason@rtfmconsult.com>, Kris Kennaway <kris@obsecurity.org>, "David O'Brien" <obrien@FreeBSD.ORG>, hubs@FreeBSD.ORG
Subject:   Re: Poor state of some top-level FTP mirrors
Message-ID:  <20030310072611.GB2126@athlon.pn.xcllnt.net>
In-Reply-To: <20030310064332.M84136@govital.net>
References:  <20030309215448.GB30033@dragon.nuxi.com> <Pine.GSO.4.50.0303101116080.41-100000@luna.rtfmconsult.com> <20030310013355.GA70336@rot13.obsecurity.org> <Pine.GSO.4.50.0303101139360.41-100000@luna.rtfmconsult.com> <20030310064332.M84136@govital.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030310072611.GB2126>