From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 24 19:23:50 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 D76E91065686 for ; Wed, 24 Mar 2010 19:23:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A8FFE8FC1A for ; Wed, 24 Mar 2010 19:23:50 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 579A646B82; Wed, 24 Mar 2010 15:23:50 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 9B12E8A021; Wed, 24 Mar 2010 15:23:49 -0400 (EDT) From: John Baldwin To: Bakul Shah Date: Wed, 24 Mar 2010 13:36:39 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <201003231108.45102.jhb@freebsd.org> <20100324165748.7334B5B42@mail.bitblocks.com> In-Reply-To: <20100324165748.7334B5B42@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003241336.39689.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Wed, 24 Mar 2010 15:23:49 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.7 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: hackers@freebsd.org Subject: Re: Another tool for updating /etc 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, 24 Mar 2010 19:23:50 -0000 On Wednesday 24 March 2010 12:57:48 pm Bakul Shah wrote: > On Tue, 23 Mar 2010 11:08:45 EDT John Baldwin wrote: > > or 'cvs up'. If the local changes I made do not conflict, then just merge the > > changes automatically (e.g. enabling a serial console in /etc/ttys should not > > conflict with $FreeBSD$ changing when moving from 7.2 to 7.3). > > > > To that end, I wrote a new tool that I think does a decent job of solving > > these goals. It does not force you to read the diffs of any files updated in > > /etc, but there are other tools available for that. However, if you are ok > > with reading UPDATING, commit logs, and/or release notes for that sort of > > info, then this tool may work for you. > > > > It also has a nice feature in that you can generate a 'diff' of your current > > /etc tree against the "stock" tree allowing you to easily see what local > > changes you have made. I have already found this feature to be far more > > useful than I first expected. > > > > The UI is (hopefully) minimalist. The default output looks like the output of > > 'svn up' or 'cvs up'. > > > > If you'd like to give it a shot, you can find the script and manpage at > > http://www.FreeBSD.org/~jhb/etcupdate/ There is a README file that gives a > > brief overview and instructions on how to bootstrap the needed metadata before > > the first update. There is also an HTML version of the manpage. > > Looks good! > > But I wonder... why not build something like this around cvs? > Basically a three way merge is exactly what we want for /etc, > right? cvs because it is in the base system. I used to > maintain /etc changes in cvs and that was useful in keeping > track of configuration changes on shared machines. I wanted something that was version-control agnostic (we use svn at work for our local version of FreeBSD for example). Also, while having full history would be nice, that uses up a good bit more disk space and would duplicate the history that is available in the existing FreeBSD version control (but with less useful details such as commit log messages). I use CVS for /etc on some of my machines as well and find it handy, but I tend to not use that to do full 3-way merges, but just track what is in /etc itself. -- John Baldwin