From owner-freebsd-questions@FreeBSD.ORG Wed Feb 4 23:37:47 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58B18106564A for ; Wed, 4 Feb 2009 23:37:47 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 927188FC13 for ; Wed, 4 Feb 2009 23:37:46 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl179-104.kln.forthnet.gr [77.49.0.104]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id n14NbSHg012639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 5 Feb 2009 01:37:34 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n14NbRlh002794; Thu, 5 Feb 2009 01:37:27 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n14NbQM4002793; Thu, 5 Feb 2009 01:37:26 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: FreeBSD References: <4989B239.9090504@optiksecurite.com> Date: Thu, 05 Feb 2009 01:37:26 +0200 In-Reply-To: <4989B239.9090504@optiksecurite.com> (freebsd@optiksecurite.com's message of "Wed, 04 Feb 2009 10:20:25 -0500") Message-ID: <878wolpydl.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: n14NbSHg012639 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.867, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.53, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: "freebsd-questions@freebsd.org" Subject: Re: OT: SVN checkout checksumming 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: Wed, 04 Feb 2009 23:37:47 -0000 On Wed, 04 Feb 2009 10:20:25 -0500, FreeBSD wrote: > Hi everyone, > > I have asked this question on the svnforum.org and didn't got a good > answer, so I try it here. > > I want to use SVN to automate the update process of a custom > application. So, I'm planning to indicate to every PC to update > periodically to a specific branch of the repository. The problem is > that I need to be sure the files where not corrupted during the > transfer. So, I'm planning to generate the hash (SHA or MD5, doesn't > really matters) of every file downloaded by SVN on the client. For > this to work, I need to compare the hashes with their server-side > equivalent. I looked at the post-commit hooks and it looks pretty > interesting but is anyone doing something similar? How are you > creating the file containing the hash of the committed file? Let's assume for a moment that you install a post-commit hook that generates a SHA-256 checksum of all the files in the latest repo revision on the svn server. For the sake of simplicity, let's assume that this file is a simple, plain text file that is named db/revs/NUMBER.sha256 where 'NUMBER' is the revision number you are check-summing. How are you going to *safely* transmit those SHA-256 checksums to the client on 'svn checkout'? If you have a communication channel between the SVN server and its clients that it "secure enough", why would you want to go through the extra hoops to communicate the checksums of the files and not tunnel the checkout itself through the secure channel? > I got 2 answers on the forum from people thinking that SVN takes care > of the checksumming by itself, but I would like a little more > information than that. What is the algorithm used would be a nice > start. They were probably referring to the internal checksums of the FSFS storage format of the SVN repository itself. There is a description of the internal FSFS storage format at: http://svn.collab.net/repos/svn/trunk/subversion/libsvn_fs_fs/structure This may be useful as you try to understand what is stored in an FSFS-based Subversion repository.