From owner-freebsd-current@FreeBSD.ORG Wed Jul 11 22:41:40 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6994D16A468; Wed, 11 Jul 2007 22:41:40 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.freebsd.org (Postfix) with ESMTP id 2EDDC13C457; Wed, 11 Jul 2007 22:41:40 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout5.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l6BMfZnR006237 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 11 Jul 2007 15:41:36 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l6BMfY9B003458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 11 Jul 2007 15:41:35 -0700 Message-ID: <46955C9E.6090101@u.washington.edu> Date: Wed, 11 Jul 2007 15:41:34 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Doug Barton References: <20070419133550.GA65054@tirith.brixandersen.dk> <20070419200929.GA70735@tirith.brixandersen.dk> <4693BC3E.1050605@web.am> <200707110115.42139.pieter@degoeje.nl> <469417CB.7010705@FreeBSD.org> <4694AAF1.6050302@web.am> <46951CC2.5050602@FreeBSD.org> In-Reply-To: <46951CC2.5050602@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.11.152433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Pieter de Goeje , Gaspar Chilingarov , freebsd-current@freebsd.org Subject: Re: RFT: bin/106642: [patch] Allow excluding certain files from mergemaster (8) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2007 22:41:40 -0000 Doug Barton wrote: > Gaspar Chilingarov wrote: > > >> Well another question -- is it possible teach somehow mergemaster, that >> it should never touch passwd, groups, /etc/ttys or bunch of another files? >> > > Sure, you just do the opposite of what I did in the last script. If > the file doesn't exist in the temproot when it's time to start > comparing, mergemaster will never do anything with it. So here is some > more out of the script that I actually use: > > #!/bin/sh > # NOTE: No PATH needed, because mm's PATH is already draconian enough > case "${PRE_WORLD}" in > '') rm -f /etc/defaults/pccard.conf > rm -f ${TEMPROOT}/etc/motd > rm -f ${TEMPROOT}/etc/printcap > rm -f ${TEMPROOT}/etc/namedb/named.* > ;; > esac > > What if a user or group was added to /etc/group or /etc/passwd that was required for the updated version of the OS? I would see this behavior a bit counterproductive in this case. >> About pre-script which you suggested, there is another problem -- I MAY >> have new scripts in /etc/rc.d, but NEVER change the system's scripts. >> > > Simple answer, don't do that. Put your scripts in /usr/local/etc/rc.d > instead, and as of 6.1 and newer they will be included in the base > rcorder. Therefore there will be no difference in when they are run. > There is a default assumption that stuff in /etc/rc.d is the systems, > and the systems only. Now that local scripts (including ports) are in > the base rcorder, there is no reason not to do it that way. > Agreed. Stuff should stay out of /etc/rc.d. Why not have mergemaster overwrite those scripts by default? >> In other hand running rm /etc/rc.d/* before mergermaster's start can >> render system unusable, if mergemaster will fail for some reason. >> > > That's a good reason to do the update in single user mode, and always > keep good backups. :) Please understand that I am not advocating that > anyone actually DO what I suggested, I'm just pointing out that there > are alternatives that already exist that can accomplish what people > want to do here. > > Having given it a little more thought, it would probably be safer to > do something like: > case "${PRE_WORLD}" in > '') mv ${TEMPROOT}/etc/rc.d/* /etc/rc.d/ > ;; > esac > > But my basic point is the same. I added MM_PRE_COMPARE_SCRIPT and > MM_EXIT_SCRIPT to give users MORE flexibility than adding more (and > more complex) CLI options would do. Please take advantage of it. :) > > Doug Agreed, once again. -Garrett