From owner-freebsd-stable Sun Oct 27 16:51: 7 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED64437B401 for ; Sun, 27 Oct 2002 16:51:04 -0800 (PST) Received: from 12-234-90-219.client.attbi.com (12-234-90-219.client.attbi.com [12.234.90.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF91843E77 for ; Sun, 27 Oct 2002 16:51:03 -0800 (PST) (envelope-from DougB@FreeBSD.org) Received: from FreeBSD.org (master.gorean.org [10.0.0.2]) by 12-234-90-219.client.attbi.com (8.12.5/8.12.5) with ESMTP id g9S0oriZ048423; Sun, 27 Oct 2002 16:50:56 -0800 (PST) (envelope-from DougB@FreeBSD.org) Message-ID: <3DBC89ED.B5A1B5A9@FreeBSD.org> Date: Sun, 27 Oct 2002 16:50:53 -0800 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.79 [en] (X11; U; Linux 2.4.2 i386) X-Accept-Language: en MIME-Version: 1.0 To: Phil Kernick Cc: Lucky Green , freebsd-stable@FreeBSD.org Subject: Re: Mergemaster [was: Re: Ifconfig config of gif tunnels] References: <004401c2742a$d6169d90$6501a8c0@VAIO650> <3DAC0045.4060201@Kernick.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Phil Kernick wrote: > I'd also like the opposite - a list of files that mergemaster will not update > under any circumstances. mergemaster does its comparison based on the presence or absence of files in the live tree on the system, and the temproot tree created by mergemaster. So, if you have files that you never want mm to compare, you can simply use the MM_PRE_COMPARE_SCRIPT hook and delete those files from the temproot tree. Similarly, if you always want to update certain files, you could use the same hook and delete the files from the live tree, and use the autoinstall option to mergemaster. in ~/.mergemasterrc (or /etc/mergemaster.rc) AUTO_INSTALL=yes MM_PRE_COMPARE_SCRIPT=/usr/local/libexec/mergemaster_pre_compare In /usr/local/libexec/mergemaster_pre_compare: #!/bin/sh # NOTE: No PATH needed, because mm's PATH is already draconian enough # I want mm to always ignore the motd rm -f ${TEMPROOT}/etc/motd # I don't use inetd, so always just update this file rm -f /etc/inetd.conf # NOTE: No exit here, or else mm will exit too Of course, the motd example could just as easily be accomplished by putting 'IGNORE_MOTD=yes' in .mergemasterrc, but you get the idea. Because of how mm sources the *_SCRIPT's, all the internal variables are available for its use, which is quite handy. You could make the second example somewhat safer by doing this for example: if [ -n "${AUTO_INSTALL}" ]; then rm -f /etc/inetd.conf fi Personally, I am philosophically opposed to having mm automatically update files, which is why there are no options to do so in the script itself. However, enough people have requested those features that I have added the _SCRIPT hooks so that people can load their own guns, and point them at their feet at will. > At the moment I remove the CVS id from the top of > all of the files that I modify so that I remember during mergemaster whether I > should update them or not. ERrr.... that's weird. :) If the cvs ID's are the same in the live version and the temproot version, mm will simply ignore the file. If they are different, mm will show you the diffs, and you can choose how to deal with them. I like the idea that someone else suggested of putting: # ---- LOCAL MODIFICATIONS ---- # near anything you changed, so that you can see it in the diffs easier. I do something similar myself. HTH, Doug To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message