Re: Mergemaster [was: Re: Ifconfig config of gif tunnels]

2002-10-27 Thread Doug Barton
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 [EMAIL PROTECTED]
with unsubscribe freebsd-stable in the body of the message



Mergemaster [was: Re: Ifconfig config of gif tunnels]

2002-10-15 Thread Lucky Green

Matthew Dillon wrote about mergemaster:
-
I also like the idea someone posted in regards to having a list of
files 'typically never modified by the sysop', e.g. /etc/defaults/*,
/etc/rc*, and so forth, though with the patches I have so far that
particular problem is not so big a deal any more (at least not for
me).
-

Mergemaster automatically updating the various default files, displaying
to the admin only the files the admin actually might want to see during
a normal upgrade, would be quite desirable to me. What would also be
helpful, though this may be diff's fault, would be if there were less
tendency for mergemaster to combine changes the admin likely wants to
make (adding a new user the OS requires) with changes the admin does not
want to make (removing surrounding entries out of master.passwd),
requiring the admin to make a note of mergemaster's suggestions followed
by editing the file by hand.

Thanks,
--Lucky Green


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-stable in the body of the message



Re: Mergemaster [was: Re: Ifconfig config of gif tunnels]

2002-10-15 Thread David Wolfskill

From: Lucky Green [EMAIL PROTECTED]
Date: Tue, 15 Oct 2002 02:11:22 -0700

...  What would also be
helpful, though this may be diff's fault, would be if there were less
tendency for mergemaster to combine changes the admin likely wants to
make (adding a new user the OS requires) with changes the admin does not
want to make (removing surrounding entries out of master.passwd),
requiring the admin to make a note of mergemaster's suggestions followed
by editing the file by hand.

Even to the extent that this happens, it requires no such response
from the person running mergemaster.

Rather, consider using the e b response to edit both [old and new
sets of lines].

Cheers,
david   (links to my resume at http://www.catwhisker.org/~david)
-- 
David H. Wolfskill  [EMAIL PROTECTED]
To paraphrase David Hilbert, there can be no conflicts between the
discipline of systems administration and Microsoft, since they have
nothing in common.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-stable in the body of the message



Re: Mergemaster [was: Re: Ifconfig config of gif tunnels]

2002-10-15 Thread Phil Kernick

Lucky Green wrote:
 Matthew Dillon wrote about mergemaster:
 -
 I also like the idea someone posted in regards to having a list of
 files 'typically never modified by the sysop', e.g. /etc/defaults/*,
 /etc/rc*, and so forth, though with the patches I have so far that
 particular problem is not so big a deal any more (at least not for
 me).
 -

I'd also like the opposite - a list of files that mergemaster will not update 
under any circumstances.  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.


Phil.


-- 
_-_|\   Phil Kernick  E-Mail: [EMAIL PROTECTED]
   / \  ROTFL Enterprises Mobile:  041 61 ROTFL
   \_.-*_/
v   Humourist, satirist, and probably a few more 'ists to boot!


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-stable in the body of the message



Re: Mergemaster [was: Re: Ifconfig config of gif tunnels]

2002-10-15 Thread Michael Bretterklieber

Hi,

I think something like /etc/defaults/mergemaster.conf, where for each 
file or for each directory (or pattern) can be defined the action, like 
always update,  never update, merge.

There are many files wich can be always updated during mergemaster like 
/etc/periodic or rc.*.

The user should be able to overwrite the settings in his own 
/etc/mergemaster.conf (same system like for rc.conf or make.conf).

It would be great to have this or something like this in mergemaster, 
because this can save many time.

bye,

Phil Kernick schrieb:
 Lucky Green wrote:
 
 Matthew Dillon wrote about mergemaster:
 -
 I also like the idea someone posted in regards to having a list of
 files 'typically never modified by the sysop', e.g. /etc/defaults/*,
 /etc/rc*, and so forth, though with the patches I have so far that
 particular problem is not so big a deal any more (at least not for
 me).
 -
 
 
 I'd also like the opposite - a list of files that mergemaster will not 
 update under any circumstances.  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.
 
 
 Phil.
 
 

-- 
--
--
E-mail: [EMAIL PROTECTED]

JAWA Management Software GmbH
Liebenauer Hauptstr. 200
A-8041 GRAZ
Tel: ++43-(0)316-403274-12
Fax: ++43-(0)316-403274-10
GSM: ++43-(0)676-93 96 698
homepage: http://www.jawa.at
- privat ---
E-mail:   [EMAIL PROTECTED]
homepage: http://www.inode.at/mbretter
--



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-stable in the body of the message



mergemaster (was Re: Ifconfig config of gif tunnels)

2002-10-13 Thread Adrian Wontroba

On Sun, Oct 13, 2002 at 01:05:27PM -0400, Trish Lynch wrote:

 I';ve done something semi-simple to manage things that possibly might get
 broken by mergemaster.

I don't recall ever having anything broken by mergemaster.

I have broken things for myself by failing to drive mergemaster
properly, e.g. my not noticing that a file (i)nstalled by mergemaster
should have been (m)erged, to preserve local changes.  The incidence of
this has much reduced since I adopted the convention of flagging files I
have modified with a #  MODIFIED  line near the top.

-- 
Adrian Wontroba

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-stable in the body of the message