From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 1 22:16:15 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76D7E16A41F for ; Sat, 1 Oct 2005 22:16:15 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from gate.bitblocks.com (bitblocks.com [209.204.185.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 345B543D45 for ; Sat, 1 Oct 2005 22:16:15 +0000 (GMT) (envelope-from bakul@bitblocks.com) Received: from bitblocks.com (localhost [127.0.0.1]) by gate.bitblocks.com (8.13.4/8.13.1) with ESMTP id j91MG7IE064664; Sat, 1 Oct 2005 15:16:07 -0700 (PDT) (envelope-from bakul@bitblocks.com) Message-Id: <200510012216.j91MG7IE064664@gate.bitblocks.com> To: "M. Warner Losh" In-reply-to: Your message of "Sat, 01 Oct 2005 14:58:07 MDT." <20051001.145807.69698496.imp@bsdimp.com> Date: Sat, 01 Oct 2005 15:16:07 -0700 From: Bakul Shah Cc: freebsd-hackers@freebsd.org Subject: Re: A smarter mergemaster 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: Sat, 01 Oct 2005 22:16:15 -0000 > : cd > : make etc-diff # ensure your workspace reflects what is in /etc > : > : > : make import # import the latest /usr/src/etc into etc workspace > : make diff # look over the changes > : > : make install # install to /etc; do mkdb etc. > : > : > : Finally: > : make commit # commit changes to local repo > : OR > : make undo # if things didn't quite work, restore /etc to old state. > : > : Roughly, the current mergemaster does the work of make > : import, make diff, repairs and install. > : > : Comments? > > I implemented something very similar to this for maintaining all the > etc files at Timing Solutions. We have a tree that gets installed > over the base OS. > > However, it doesn't easily allow for a mergemaster step since it > installs all the files with schg set, and doesn't have three way merge > in potential. mergemaster just has to do a merge in a temp workspace (initially a copy of /etc). Makefile can do all the schg magic when it installs to /etc. But this can get messy and I don't have a clean model.... One would have to keep Freebsd's /usr/src/etc in a vendor branch and do a checkout -j or something. When there is no conflict, an update goes very fast. In case of conflicts perhaps one can use the interactive merge feature from mergemaster. For files of same name but with entirely different content, merge with the vendor branch needs to be avoided. Basically anything we can do to make it easy to use this "best practice" would be nice.... even nicer if it covers /usr/local/etc!