From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 6 09:58:01 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8AF71065670 for ; Wed, 6 Oct 2010 09:58:01 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp1.one.com (csmtp1.one.com [195.47.247.21]) by mx1.freebsd.org (Postfix) with ESMTP id 430F48FC13 for ; Wed, 6 Oct 2010 09:58:01 +0000 (UTC) Received: from [192.168.0.22] (0x573fa596.cpe.ge-1-1-0-1109.ronqu1.customer.tele.dk [87.63.165.150]) by csmtp1.one.com (Postfix) with ESMTP id 8E5BF1BC054B5; Wed, 6 Oct 2010 09:57:59 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/signed; boundary=Apple-Mail-1545-961717679; protocol="application/pkcs7-signature"; micalg=sha1 From: Erik Cederstrand In-Reply-To: <4cac2dfb.tcWd/AxzVjqyrL09%perryh@pluto.rain.com> Date: Wed, 6 Oct 2010 11:57:59 +0200 Message-Id: <9C53E6F3-82AB-4D95-B61A-ED49AC030B7A@cederstrand.dk> References: <52C32EA5-A380-4237-A27C-9E2DF2D4E022@cederstrand.dk> <20101005135906.GA3430@owl.midgard.homeip.net> <4cac2dfb.tcWd/AxzVjqyrL09%perryh@pluto.rain.com> To: perryh@pluto.rain.com X-Mailer: Apple Mail (2.1081) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org Subject: Re: Timestamps in static libraries X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2010 09:58:01 -0000 --Apple-Mail-1545-961717679 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Den 06/10/2010 kl. 10.06 skrev perryh@pluto.rain.com: > Erik Cederstrand wrote: >=20 >> It seems I can at least normalize the .a files using something >> like the following to weed out timestamps and uid/gid: >>=20 >> % ar -x /usr/lib/libfetch.a >> % chown 0:0 * >> % touch -t 197001010000 * >> % ar -r libfetch.a `ar -t /usr/lib/libfetch.a` >>=20 >> ... Unfortunately it seems there's still a creation time of the >> archive itself that I cant alter using the above, so the md5 sums >> still don't match: >>=20 >> % diff mod.strings orig.strings >> 2c2 >> < / 1286312209 0 0 0 958 ` >> --- >>> / 1269146263 0 0 0 958 ` >=20 > Any particular reason to recollect them into an archive, if the > point is just to check md5 signatures? I'm pretty sure collecting > them with tar instead will avoid this problem. That's of course another option. I could unpack the archive and be = satisfied if all contained files have matching md5's. I guess the perfectionist in me is protesting. If I build FreeBSD twice = from the same source code, the result should be exactly the same. It = would be useful in a number of cases, e.g. IDS. ccache also relies on = the assumption that checksums will match on identical source code and = compiler version, although I know that's a level beneath where ar = operates. Thanks, Erik= --Apple-Mail-1545-961717679--